-
-
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: Change error message #5104
mv: Change error message #5104
Conversation
Could you please add a test to make sure we don't regress? thanks :) |
A test that this is the intended behavior?
|
GNU testsuite comparison:
|
yeah |
Edit: Ok I thought I was missing something.. Looks like that took care of the GNU test. looks like the only failed test was an emulator issue
|
GNU testsuite comparison:
|
is it ready to be merged? sorry for the latency :( |
After looking at the issue again. Can I confirm that
is the preferred message, before I change it? That seemed to be the verdict in the GNU thread. also, @tertsdiepraam sorry this may not be the best place for this, but you will need to approve this anyway. just a reminder from @eza for you to publish uutils-term-grid to crates.io, when you get a chance ;) |
What GNU thread are you referring to? If GNU decides on some behaviour, we can probably match it.
Ah of course! I'll try to make that a priority this weekend. |
The referenced thread in the issue
If I can get a thumbs up, I'll change it to:
Thanks :) Not a huge rush but we would definitely like to make the switch before the upcoming 1.0 release. We really appreciate it ❤️ |
Yeah I like message in the GNU thread! Let's go for that! |
I know it looks like unnecessary code duplication, but I could not get the show! macro to work without repeating match multi_progress {
Some(ref pb) => pb.suspend(|| show!(e)),
None => show!(e),
}; in both branches. If there is a better way to accomplish this, or if you would prefer it be a match statement, please let me know. Note: that added semicolon in |
GNU testsuite comparison:
|
Sorry for the noise, would you like me to rebase that into one commit? |
don't bother, we can squash them |
GNU testsuite comparison:
|
@tertsdiepraam with the work-around, did you still want a note about moving to |
Yeah I think that's a good idea. Using thay llt would still be cleaner than the workaround I think. |
Should be all set. Nushell PR is ready, when this is merged. (based it off my main branch, so these changes are included) |
Looks good! I think you might have missed this comment of mine:
I think it would be nice if we handle all of these, like ENOTEMPTY, just like GNU does. |
Ok I re-read the GNU list.
Meaning you would like the output changed |
Yeah it looks like that's what GNU did. |
Ok, but not only in the circumstances where it's being overwritten? It sounded like what they were referring to was removing the source file from the error message, in all the messages where the issue is @ destination. I'll see how many places this applies. It will require some more |
@tertsdiepraam
It refers to the destination. Sorry I haven't had time to really dig into this. Were they explicit in what error message they would use? Did they intend on using
so in the case of the message above, it would instead be:
Just confirming, because looking for every occurrence, and then some of those will also have to match on more libc error values, which I noticed will act different in tests (when multiple files are sent and different overwrite modes,etc), will definitely end up being a non-trivial change. Is there any behavior you can think of that GNU might have been referring to where that message wouldn't be appropriate? also, I am going to remove these changes from the nushell PR and submit that, because this might take longer than expected. |
I think what thye did was change the message the same way that you did, but not just for ENOTEMPTY, but for all other error variants as well. I don't think they hanged any errors elsewhere. Does that clarify it? |
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
Issue: mv: error message "Directory not empty" is confusing #5102
Error message changed to: "A directory with the same name exists at destination"