Another edge case: Don't error on non-matching restore path globs (#228).
This commit is contained in:
parent
ebeb5efe05
commit
30525c43bf
2 changed files with 7 additions and 2 deletions
|
@ -62,6 +62,7 @@ def extract_archive(
|
||||||
remote_path=None,
|
remote_path=None,
|
||||||
destination_path=None,
|
destination_path=None,
|
||||||
progress=False,
|
progress=False,
|
||||||
|
error_on_warnings=True,
|
||||||
):
|
):
|
||||||
'''
|
'''
|
||||||
Given a dry-run flag, a local or remote repository path, an archive name, zero or more paths to
|
Given a dry-run flag, a local or remote repository path, an archive name, zero or more paths to
|
||||||
|
@ -90,10 +91,12 @@ def extract_archive(
|
||||||
# the terminal directly.
|
# the terminal directly.
|
||||||
if progress:
|
if progress:
|
||||||
execute_command_without_capture(
|
execute_command_without_capture(
|
||||||
full_command, working_directory=destination_path, error_on_warnings=True
|
full_command, working_directory=destination_path, error_on_warnings=error_on_warnings
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Error on warnings, as Borg only gives a warning if the restore paths don't exist in the
|
# Error on warnings, as Borg only gives a warning if the restore paths don't exist in the
|
||||||
# archive!
|
# archive!
|
||||||
execute_command(full_command, working_directory=destination_path, error_on_warnings=True)
|
execute_command(
|
||||||
|
full_command, working_directory=destination_path, error_on_warnings=error_on_warnings
|
||||||
|
)
|
||||||
|
|
|
@ -282,6 +282,8 @@ def run_actions(
|
||||||
remote_path=remote_path,
|
remote_path=remote_path,
|
||||||
destination_path='/',
|
destination_path='/',
|
||||||
progress=arguments['restore'].progress,
|
progress=arguments['restore'].progress,
|
||||||
|
# We don't want glob patterns that don't match to error.
|
||||||
|
error_on_warnings=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Map the restore names or detected dumps to the corresponding database configurations.
|
# Map the restore names or detected dumps to the corresponding database configurations.
|
||||||
|
|
Loading…
Reference in a new issue