1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00

Use of trap '' ERR

This commit is contained in:
polytan02 2017-02-24 11:18:06 +00:00
parent 55eaed2972
commit e7f0cd37a9

View file

@ -12,7 +12,7 @@
fi fi
sudo yunohost backup create --ignore-hooks --apps $app --name $app-before-upgrade --quiet sudo yunohost backup create --ignore-hooks --apps $app --name $app-before-upgrade --quiet
EXIT_PROPERLY () { EXIT_PROPERLY () {
trap '' EXIT trap '' ERR
set +eu set +eu
sudo yunohost backup restore --ignore-hooks $app-before-upgrade --apps $app --force --quiet # Restore the backup if upgrade failed sudo yunohost backup restore --ignore-hooks $app-before-upgrade --apps $app --force --quiet # Restore the backup if upgrade failed
ynh_die "Upgrade failed. The app was restored to the way it was before the failed upgrade." ynh_die "Upgrade failed. The app was restored to the way it was before the failed upgrade."