-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chmod: fix error handling if multiple files are handled #9793
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
base: main
Are you sure you want to change the base?
Conversation
|
could you please add a test to make sure we don't regress? thanks |
|
GNU testsuite comparison: |
sylvestre
left a comment
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.
need tests
I don’t think this should actually conflict with your PR #9802. I looked through your code and added my test locally; it does fail for this specific issue, but it i double checked and verified its fixed by the same online change as in this PR. If this PR lands in main, it should be straightforward to resolve with a rebase. Worst case, it would just require manually applying the fix (a simple .and(r) on l. 422 in your current fork). I still think keeping these as separate PRs makes sense, since it provides clearer documentation of what fixes which issue and ensures the corresponding regression tests are in place. |
Test has been added. |
fixing #9790.
When multiple files are parsed only the last exit code would be returned. This means if the command succeeded for the last file the return code for the whole command would always be success even though an earlier files would be unsuccesful.