mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-10 15:04:55 +08:00
Fix empty tags created a bogus restic command line
This commit is contained in:
parent
825ebcf478
commit
a31edd00c0
1 changed files with 4 additions and 2 deletions
|
@ -510,8 +510,6 @@ class ResticRunner:
|
|||
cmd += " --{}exclude-file {}".format(case_ignore_param, exclude_file)
|
||||
if exclude_caches:
|
||||
cmd += " --exclude-caches"
|
||||
for tag in tags:
|
||||
cmd += " --tag {}".format(tag)
|
||||
if one_file_system:
|
||||
cmd += " --one-file-system"
|
||||
if use_fs_snapshot:
|
||||
|
@ -522,6 +520,10 @@ class ResticRunner:
|
|||
logger.warning(
|
||||
"Parameter --use-fs-snapshot was given, which is only compatible with Windows"
|
||||
)
|
||||
for tag in tags:
|
||||
tag = tag.strip()
|
||||
if tag:
|
||||
cmd += " --tag {}".format(tag)
|
||||
if dry_run:
|
||||
cmd += " --dry-run"
|
||||
if additional_parameters:
|
||||
|
|
Loading…
Add table
Reference in a new issue