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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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

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