From f6a4d4e1ffd0f757bb92ce2beb1e19085edbadf8 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Fri, 15 Sep 2017 20:43:45 +0200 Subject: [PATCH] add ynh_abort_if_errors --- scripts/backup | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index 3524481..3e329b9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,8 +6,8 @@ # MANAGE SCRIPT FAILURE #================================================= -# Exit on command errors and treat access to unset variables as an error -set -eu +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors #================================================= # IMPORT GENERIC HELPERS diff --git a/scripts/restore b/scripts/restore index 37a657e..d94668b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,8 +6,8 @@ # MANAGE SCRIPT FAILURE #================================================= -# Exit on command errors and treat access to unset variables as an error -set -eu +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors #================================================= # IMPORT GENERIC HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index ee4a4a7..3648de0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #=================================================