-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
cp
: Usage of --recursive
multiple times
#5027
Comments
Turns out it was just a mistake (and not some obscure feature):
I agree with the last statement, we should silently ignore errors like this to maintain compatibility. |
Yeah basically all flags in coreutils do this. In clap, we generally fix this by allowing them to override themselves, which should be turned on already. So I'm not sure what's going on there. Good catch! Maybe this should be used: https://docs.rs/clap/latest/clap/struct.Command.html#method.args_override_self
I agree with this too. Keep the bug reports coming and we'll get closer and closer! |
cp: allow multiple usages of -R - Closes: #5027
works for all other rm args
It seems GNU coreutils doesn't mind if the user uses the recursive argument multiple times, this leads to incompatibility with our implementation since we reject it:
I found this issue while using this script which calls
cp
like this:I'm not sure why it's being used like that but it works with GNU coreutils.
This issue might be more widespread as I expect other GNU utils to follow the same lenient behavior regarding arguments which set a flag.
The text was updated successfully, but these errors were encountered: