Skip to content
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

chmod: supress verbose output when not verbose #4402

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

dmatos2012
Copy link
Contributor

Closes #4381. Shows verbose output only when --verbose flag is used instead

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!

Comment on lines 193 to +204
if !self.quiet {
show!(USimpleError::new(
1,
format!("cannot operate on dangling symlink {}", filename.quote()),
));
}
if self.verbose {
println!(
"failed to change mode of {} from 0000 (---------) to 1500 (r-x-----T)",
filename.quote()
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your fault, but it's weird that quiet and verbose are separate booleans isn't it? Those options should override each other, so that

chmod --verbose --quiet

is the same as

chmod --quiet

And it's also not currently possible to do, for example,

chmod --verbose --verbose

Maybe this is a good opportunity to fix that?

Copy link
Member

@tertsdiepraam tertsdiepraam Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, nevermind, that's not how GNU chmod works! --verbose --quiet and --quiet are different in GNU so what you got is correct.

@tertsdiepraam
Copy link
Member

Thanks! If you're up for it, you can fix that --verbose --verbose and --quiet --quiet should be allowed.

@tertsdiepraam tertsdiepraam merged commit 9d655bf into uutils:main Feb 21, 2023
@dmatos2012 dmatos2012 deleted the chmod-verbose-message branch October 24, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chmod: Extra verbosity for symlink creation is wrong
2 participants