mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
chmod: print change message to stdout, not stderr
This commit is contained in:
parent
080998b6ef
commit
74958794c6
2 changed files with 4 additions and 4 deletions
|
@ -322,7 +322,7 @@ impl Chmoder {
|
|||
show_error!("{}", err);
|
||||
}
|
||||
if self.verbose {
|
||||
show_error!(
|
||||
println!(
|
||||
"failed to change mode of file '{}' from {:04o} ({}) to {:04o} ({})",
|
||||
file.display(),
|
||||
fperm,
|
||||
|
@ -334,7 +334,7 @@ impl Chmoder {
|
|||
Err(1)
|
||||
} else {
|
||||
if self.verbose || self.changes {
|
||||
show_error!(
|
||||
println!(
|
||||
"mode of '{}' changed from {:04o} ({}) to {:04o} ({})",
|
||||
file.display(),
|
||||
fperm,
|
||||
|
|
|
@ -330,8 +330,8 @@ fn test_chmod_recursive() {
|
|||
.arg("a")
|
||||
.arg("z")
|
||||
.succeeds()
|
||||
.stderr_contains(&"to 0333 (-wx-wx-wx)")
|
||||
.stderr_contains(&"to 0222 (-w--w--w-)");
|
||||
.stdout_contains(&"to 0333 (-wx-wx-wx)")
|
||||
.stdout_contains(&"to 0222 (-w--w--w-)");
|
||||
|
||||
assert_eq!(at.metadata("z/y").permissions().mode(), 0o100222);
|
||||
assert_eq!(at.metadata("a/a").permissions().mode(), 0o100222);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue