summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-15 21:14:04 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-15 23:13:10 -0400
commit0d673eadca425d63c7367372575058324e9ecc91 (patch)
treec6a37ea8ab8075e4ef216803902c86db6bf89b32 /src
parentcac0faec9d6c2ab143debdc3c6fcb5b661e01dd3 (diff)
librechroot: (bugfix) Use the correct exit status if stdout isn't a TTY.v20131015
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/librechroot2
1 files changed, 1 insertions, 1 deletions
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