Skip to content

install: report why a target cannot be used as a directory - #15365

Merged
sylvestre merged 1 commit into
uutils:mainfrom
limadog9:fix/install-target-diagnostic
Oct 15, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
limadog9:fix/install-target-diagnostic

Conversation

@limadog9

Copy link
Copy Markdown
Contributor
Report accurate errors for unusable destination directories. Closes #14999.

Comment thread src/uu/install/src/install.rs Outdated
}
if reason.kind() == std::io::ErrorKind::NotFound {
// A trailing slash requires a directory even when its parent exists.
let reason = if is_new_file_path(target_dir) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the shadowed reason is a bit hard to follow, could this be flattened?

@limadog9
limadog9 force-pushed the fix/install-target-diagnostic branch from fe34847 to 7179c4d Compare October 15, 2026 12:27
@limadog9

Copy link
Copy Markdown
Contributor Author

@sylvestre Flattened this with an early return and a separate create_error binding, removing the shadowed reason. Squashed into one commit; all install tests pass. Thanks for the review!

@sylvestre
sylvestre merged commit d5a8979 into uutils:main Oct 15, 2026
99 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants