-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: fix verbose output order after prompt #7287
Conversation
GNU testsuite comparison:
|
Could you please add a test to make sure we don't regress? Thanks |
Thank you for your feedback. I'll add a test. |
In the issue #7285, when doing #[cfg(any(target_os = "linux", target_os = "android"))]
use filetime::FileTime; Therefore, in the added test, |
This test verifies the existing behavior, which is fine, but it doesn't account for the changes you made in Additionally, I think you don't need |
Thank you for your feedback. My understanding was that the tests were lacking checks for output order in my changes. I've updated the tests in a new commit accordingly. If my understanding is incorrect, please let me know. |
I think there is some confusion. Let me clarify: your change is about fixing the behavior of
to
and
That works fine. However, your test doesn't ensure this new behavior works. It ensures |
Thank you for your feedback and clarifications. I have implemented the changes accordingly; could you please review them? |
Thanks! |
Fixes: #7285
This pull request addresses an ordering issue in the cp command where the verbose message is printed before the interactive prompt for overwrite confirmation.
In GNU cp, the verbose output appears only after the user has responded to the prompt, and this PR adjusts our behavior to match that order.