head: strip os error suffix from stdout write error message (#12121)

This commit is contained in:
Sylvestre Ledru
2026-05-04 09:38:54 +02:00
committed by GitHub
parent b2c4e0c125
commit 163103355a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ impl HeadOptions {
fn wrap_in_stdout_error(err: io::Error) -> io::Error {
io::Error::new(
err.kind(),
translate!("head-error-writing-stdout", "err" => err),
translate!("head-error-writing-stdout", "err" => uucore::error::strip_errno(&err)),
)
}
+1 -1
View File
@@ -896,7 +896,7 @@ fn test_write_to_dev_full() {
.pipe_in_fixture(INPUT)
.set_stdout(dev_full)
.fails()
.stderr_contains("error writing 'standard output': No space left on device");
.stderr_is("head: error writing 'standard output': No space left on device\n");
}
}
}