-
-
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
mv: check if --target is a directory #4794
Conversation
Still fails it seems:
|
yep still working on it |
@sylvestre our program is outputting more error messages than it should (although still helpful) do we try to fix those as well? |
Can you please add a test to |
match b.target_dir { | ||
Some(_) => { | ||
return Err(MvError::TargetNotADirectory(target_dir.quote().to_string()).into()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hack ;-) When reading this snippet, I translate it to "If it's a target directory, return a 'Target is not a directory' error".
I think the TargetNotADirectory
error should be returned from where the cli args are processed.
be27e38
to
88e7cc7
Compare
Thanks for adding the tests, great work! |
88e7cc7
to
a93bccb
Compare
@shinhs0506 please don't use screenshot. they are terrible for accessibility and search To answer to your question, as clap is usually giving excellent error, we adjust the GNU test to match our. |
GNU testsuite comparison:
|
|
GNU testsuite comparison:
|
should fix mv/diag.sh