diff options
author | Naïm Favier <n@monade.li> | 2022-12-10 16:46:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 16:46:34 +0100 |
commit | 75e0609a001e6c12ca7ecfa72c4d290eb4ebc73c (patch) | |
tree | a539fb8f372bc40a25bb435a03e922bd85643cef /nixos | |
parent | bbcfd192a8f64358933df44754999c230bf97c96 (diff) |
nixos/borgbackup: fix newline escaping with optional arguments
The newline must always be escaped, otherwise `extraPruneArgs` will be treated as a separate command if `prune.prefix` is unset.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/backup/borgbackup.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index 7ccb17073f6f8..ea1d393c7b026 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -58,7 +58,7 @@ let '' + optionalString (cfg.prune.keep != { }) '' borg prune $extraArgs \ ${mkKeepArgs cfg} \ - ${optionalString (cfg.prune.prefix != null) "--glob-archives ${escapeShellArg "${cfg.prune.prefix}*"} \\"} + ${optionalString (cfg.prune.prefix != null) "--glob-archives ${escapeShellArg "${cfg.prune.prefix}*"}"} \ $extraPruneArgs ${cfg.postPrune} ''; |