Skip to content

Commit 53add6c

Browse files
committed
nixos/borgbackup: support specific warning codes when failOnWarnings=false
1 parent c9f456a commit 53add6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nixos/modules/services/backup/borgbackup.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ let
4444
borgWrapper () {
4545
local result
4646
borg "$@" && result=$? || result=$?
47-
if [[ -z "${toString cfg.failOnWarnings}" ]] && [[ "$result" == 1 ]]; then
48-
echo "ignoring warning return value 1"
47+
if [[ -z "${toString cfg.failOnWarnings}" ]] && [[ "$result" == 1 || ("$result" -ge 100 && "$result" -le 127) ]]; then
48+
echo "ignoring warning return value $result"
4949
return 0
5050
else
5151
return "$result"

0 commit comments

Comments
 (0)