mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
chmod: print change message to stdout, not stderr
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user