From 0d673eadca425d63c7367372575058324e9ecc91 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 15 Oct 2013 21:14:04 -0400 Subject: librechroot: (bugfix) Use the correct exit status if stdout isn't a TTY. Because of the work-around for systemd-nspawn's buggy I/O, it was discarding the exit status if stdout wasn't a TTY. My work-around for *this* is to set -o pipefail. --- src/chroot-tools/librechroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 81163b0..4941b95 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -181,7 +181,7 @@ arch-nspawn() { if [[ -t 1 ]]; then cmd=("$@") else - cmd=(bash --noprofile --norc -c "$(printf '%q ' "$@") |&cat") + cmd=(bash --noprofile --norc -c "set -o pipefail; $(printf '%q ' "$@") |&cat") fi set +u # if an array is empty, it counts as unbound -- cgit v1.2.2