fix pruneCmd to use optionals so multi-element list is preserved

This commit is contained in:
Matt McHenry 2020-01-31 22:06:19 -05:00 committed by Jörg Thalheim
parent 4fa2d4b5c3
commit 5ad71cfe84
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -166,7 +166,7 @@ in
backupPaths = if (backup.dynamicFilesFrom == null)
then concatStringsSep " " backup.paths
else "--files-from ${filesFromTmpFile}";
pruneCmd = optional (builtins.length backup.pruneOpts > 0) [
pruneCmd = optionals (builtins.length backup.pruneOpts > 0) [
( resticCmd + " forget --prune " + (concatStringsSep " " backup.pruneOpts) )
( resticCmd + " check" )
];