From c90d8e481ceaee3bac90d5e1fb292c2da62e4c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 3 Jun 2024 00:07:57 +0200 Subject: [PATCH] Manually set exit code on fail --- backup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.nix b/backup.nix index 9909f46..3c6d5bb 100644 --- a/backup.nix +++ b/backup.nix @@ -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