mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
In auto mode, failed steps were not triggering 'die' because tee was eating the return code
This commit is contained in:
parent
00a4cba1dd
commit
a4652842a5
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue