From a4652842a52734de716a471fc48c59ff73011749 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 14 Sep 2019 20:47:25 +0200 Subject: [PATCH] In auto mode, failed steps were not triggering 'die' because tee was eating the return code --- install_yunohost | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install_yunohost b/install_yunohost index 4c3558c..a042fe3 100755 --- a/install_yunohost +++ b/install_yunohost @@ -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 }