Skip to content

Commit 665fc96

Browse files
committed
yes: strip errno
1 parent b4feef9 commit 665fc96

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/uu/yes/src/yes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use clap::{Arg, ArgAction, Command, builder::ValueParser};
99
use std::error::Error;
1010
use std::ffi::OsString;
1111
use std::io::{self, Write};
12-
use uucore::error::{UResult, USimpleError};
12+
use uucore::error::{UResult, USimpleError, strip_errno};
1313
use uucore::format_usage;
1414
use uucore::translate;
1515

@@ -33,7 +33,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
3333
Err(err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()),
3434
Err(err) => Err(USimpleError::new(
3535
1,
36-
translate!("yes-error-standard-output", "error" => err),
36+
translate!("yes-error-standard-output", "error" => strip_errno(&err)),
3737
)),
3838
}
3939
}

util/fetch-gnu.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --stri
1111
for f in "${backport[@]}"
1212
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
1313
done
14+
# adjust for getlimits > $ver
15+
sed -i.b "s/\$ENOSPC/No space left on device/" tests/misc/yes.sh

0 commit comments

Comments
 (0)