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

fix: add arg count for cp #6690

Merged
merged 2 commits into from
Sep 10, 2024
Merged

fix: add arg count for cp #6690

merged 2 commits into from
Sep 10, 2024

Conversation

LoricAndre
Copy link

Fixes #6689

@sylvestre
Copy link
Contributor

could you please add a test to make sure we don't regress in the future
thanks

@LoricAndre
Copy link
Author

I didn't know how to robustly match the multiline error in test_cp_no_file, but I think this is enough to make sure that the missing argument error is caught by clap.
However, this does change the error message compared to GNU cp when no argument is provided:

GNU cp :

cp: missing file operand
Try 'cp --help' for more information.

uu-cp:

error: the following required arguments were not provided:
  <paths>...

Usage: target/debug/coreutils cp [OPTION]... [-T] SOURCE DEST
       target/debug/coreutils cp [OPTION]... SOURCE... DIRECTORY
       target/debug/coreutils cp [OPTION]... -t DIRECTORY SOURCE...

For more information, try '--help'.

@LoricAndre
Copy link
Author

The CI seems to have timed out, could someone restart it please ?

@sylvestre
Copy link
Contributor

sure, done

@LoricAndre
Copy link
Author

Is the error message discrepancy an issue ? I'm not familiar with how close this projects aims to stay to GNU coreutils in that regard.

@sylvestre
Copy link
Contributor

nope, we are often doing better :)

@sylvestre sylvestre merged commit ac6b115 into uutils:main Sep 10, 2024
68 checks passed
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.

Zsh completion broken for cp
2 participants