chown: warn when '.' is used as owner:group separator#11438
Merged
cakebaker merged 1 commit intouutils:mainfrom Mar 31, 2026
Merged
chown: warn when '.' is used as owner:group separator#11438cakebaker merged 1 commit intouutils:mainfrom
cakebaker merged 1 commit intouutils:mainfrom
Conversation
20cc0f4 to
1b32857
Compare
Merging this PR will improve performance by 13.59%
Performance Changes
Comparing Footnotes
|
sylvestre
reviewed
Mar 22, 2026
src/uu/chown/src/chown.rs
Outdated
| let gid = parse_gid(group, spec)?; | ||
| return Ok((uid, gid)); | ||
| } | ||
| show_warning!("'.' should be ':': {}", spec.quote()); |
Contributor
There was a problem hiding this comment.
please use the translate!() macro
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
When the spec contains '.' but no ':', emit a warning matching GNU coreutils behavior and re-parse with '.' as separator so both owner and group are applied. Closes uutils#11352
958bd70 to
3c4d72e
Compare
|
GNU testsuite comparison: |
Contributor
|
Thanks for your PR! |
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.
GNU chown emits a diagnostic when '.' is used instead of ':' as the owner:group separator. The uutils version silently accepted it.
Now emits
warning: '.' should be ':': '<spec>'to match GNU behavior. Both owner and group are still applied correctly when the dot separator is used.Closes #11352