Manually set exit code on fail

This commit is contained in:
Torjus Håkestad 2024-06-03 00:07:57 +02:00
parent f05fae6ebd
commit c90d8e481c

View File

@ -15,7 +15,7 @@ let
for i in ''${BACKUP_HELPER_DIRS//,/ }; do
echo "Starting backup of $i";
if ! output=$(restic backup "$i"); then
exit_code="$?";
exit_code=1;
echo "Backup of $i failed with exit code $?:"
echo "$output"
else