Repository navigation
chmod: print 'could not be accessed' with -v for operands that can't be stat'ed - #15884
Open
emirmrkaljevic wants to merge 1 commit into
Open
emirmrkaljevic wants to merge 1 commit into
emirmrkaljevic wants to merge 1 commit into
Conversation
… stat'ed GNU follows the error with "'FILE' could not be accessed" on stdout for a missing operand, a dangling symlink, f/ or an EACCES path, even with -f. Replace the fixed dangling-symlink line with it. Fixes uutils#15883
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15883
With
-v, GNU chmod prints'FILE' could not be accessedon stdout after the error when an operand can't be stat'ed (missing, dangling symlink,f/, EACCES). uutils printed nothing, and for a dangling symlink a fixedfailed to change mode of ... from 0000 (---------) to 1500 (r-x-----T)line.chmod-verbose-could-not-be-accessedprint (used for unreadable directories) into a smallreport_not_accessedhelper and call it for missing, dangling, EACCES and other stat errors. Like GNU it is printed with-v -fand not with-c.chmod-verbose-failed-danglingstring (en-US, fr-FR) and updated the two tests that expected it.-vwithmissing f/ f,-v -f, and-c. Output matches GNU 9.12 and 9.7.Found with behave, a black-box CLI comparison tool, by diffing uutils chmod against GNU coreutils 9.12.