Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir: fail if no arguments are provided #6791

Closed

Conversation

andrewliebenow
Copy link
Contributor

No description provided.

@andrewliebenow
Copy link
Contributor Author

#6790 can be used instead of this for the no arguments fix, but we still need the fix in this PR for:

❯ /usr/bin/mkdir '' ; printf '%s\n' "${?:?}" 
/usr/bin/mkdir: cannot create directory ‘’: No such file or directory
1

❯ coreutils mkdir '' ; printf '%s\n' "${?:?}"
0

I'll update this PR accordingly when #6790 is merged.

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

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

I like this PR (and prefer it over #5790) because it emits a clearer error message, and also handles the case of emptystring-arguments.

However, the 10 CI failures make it unclear whether this breaks anything. Can you update to current main? This would include #6972, which should resolve some (all?) CI failures.

src/uu/mkdir/src/mkdir.rs Outdated Show resolved Hide resolved
@andrewliebenow
Copy link
Contributor Author

I had missed a "." in the test, fixed now

@andrewliebenow andrewliebenow force-pushed the mkdir-no-arguments-fix branch 2 times, most recently from 3105dc0 to 1a88a45 Compare October 20, 2024 14:55
@sylvestre
Copy link
Contributor

hmm, i am sorry, i took this PR: #6790
as it seems to do the same thing but shorter

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/assert is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@andrewliebenow
Copy link
Contributor Author

#6790 can be used instead of this for the no arguments fix, but we still need the fix in this PR for:

❯ /usr/bin/mkdir '' ; printf '%s\n' "${?:?}" 
/usr/bin/mkdir: cannot create directory ‘’: No such file or directory
1

❯ coreutils mkdir '' ; printf '%s\n' "${?:?}"
0

I'll update this PR accordingly when #6790 is merged.

Going to just make a new PR instead

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.

3 participants