Add to argument exclusions for dry-run

This commit is contained in:
Sean Wallace
2025-02-17 17:28:31 -05:00
parent 0e65169503
commit 3e1052c6e4

View File

@@ -141,9 +141,12 @@ def collect_special_file_paths(
'''
# Omit "--exclude-nodump" from the Borg dry run command, because that flag causes Borg to open
# files including any named pipe we've created.
arguments = tuple(
argument for argument in create_command
if argument not in ('--exclude-nodump', '--list') and not argument.startswith('--filter')
)
paths_output = execute_command_and_capture_output(
tuple(argument for argument in create_command if argument != '--exclude-nodump')
+ ('--dry-run', '--list'),
arguments + ('--dry-run', '--list'),
capture_stderr=True,
working_directory=working_directory,
extra_environment=environment.make_environment(config),