In auto mode, failed steps were not triggering 'die' because tee was eating the return code

This commit is contained in:
Alexandre Aubin 2019-09-14 20:47:25 +02:00
parent 00a4cba1dd
commit a4652842a5

View file

@ -191,7 +191,10 @@ function apt_get_wrapper() {
-- \
apt-get $*
else
apt-get $* 2>&1 | tee -a $YUNOHOST_LOG
# Why we need pipefail : https://stackoverflow.com/a/6872163
set -o pipefail
apt-get $* 2>&1 | tee -a $YUNOHOST_LOG || return 1
set +o pipefail
fi
}