Skip to content

Commit bea8166

Browse files
FIX: use better conditional
1 parent 66a4854 commit bea8166

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/postgres.15.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ run:
7373
elif [ -f /root/upgrade_postgres ]; then
7474
unset RETCODE
7575
/root/upgrade_postgres || RETCODE=$?
76-
[ ! $RETCODE ] && rm /root/upgrade_postgres || exit $RETCODE
76+
[ -z "${RETCODE}" ] && rm /root/upgrade_postgres || exit $RETCODE
7777
fi
7878
# Necessary to enable backups
7979
install -d -m 0755 -o postgres -g postgres /shared/postgres_backup

templates/postgres.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ run:
7373
elif [ -f /root/upgrade_postgres ]; then
7474
unset RETCODE
7575
/root/upgrade_postgres || RETCODE=$?
76-
[ ! $RETCODE ] && rm /root/upgrade_postgres || exit $RETCODE
76+
[ -z "${RETCODE}" ] && rm /root/upgrade_postgres || exit $RETCODE
7777
fi
7878
# Necessary to enable backups
7979
install -d -m 0755 -o postgres -g postgres /shared/postgres_backup

0 commit comments

Comments
 (0)