borgbackup-list: fix empty backup case

This commit is contained in:
Jörg Thalheim
2024-12-23 14:01:05 +01:00
parent 68d9354b72
commit 87fa99f900

View File

@@ -152,7 +152,7 @@ in
# we need yes here to skip the changed url verification
''yes y | borg-job-${dest.name} list --json | jq '[.archives[] | {"name": ("${dest.name}::${dest.repo}::" + .name)}]' ''
) (lib.attrValues cfg.destinations)
}) | ${pkgs.jq}/bin/jq -s 'add'
}) | ${pkgs.jq}/bin/jq -s 'add // []'
'')
(pkgs.writeShellScriptBin "borgbackup-restore" ''
set -efux