diff --git a/backup.nix b/backup.nix index 94a376d..be2102e 100644 --- a/backup.nix +++ b/backup.nix @@ -7,6 +7,7 @@ let pkgs.restic ]; text = '' + # shellcheck disable=SC2031 if [ -z "$BACKUP_HELPER_DIRS" ]; then echo "BACKUP_HELPER_DIRS is not set" exit 1; @@ -18,7 +19,7 @@ let if [ $rc -ne 0 ]; then echo "Backup of $i failed with exit code $rc:" echo "$output" - exit_code=1; + exit_code="$rc"; else echo "Backup of $i successful:" echo "$output"