mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-30 13:23:01 +02:00
In the "export-tar" action, fix the use of "--log-json" when exporting to stdout (#485).
This commit is contained in:
@@ -41,7 +41,7 @@ def export_tar_archive(
|
||||
(local_path, 'export-tar')
|
||||
+ (('--remote-path', remote_path) if remote_path else ())
|
||||
+ (('--umask', str(umask)) if umask else ())
|
||||
+ ('--log-json',)
|
||||
+ (('--log-json',) if destination_path != '-' else ())
|
||||
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())
|
||||
+ (('--info',) if logger.getEffectiveLevel() == logging.INFO else ())
|
||||
+ (('--list',) if config.get('list_details') else ())
|
||||
|
||||
@@ -368,9 +368,7 @@ def test_export_tar_archive_calls_borg_with_stdout_destination_path():
|
||||
flexmock(module.flags).should_receive('make_repository_archive_flags').and_return(
|
||||
('repo::archive',),
|
||||
)
|
||||
insert_execute_command_mock(
|
||||
('borg', 'export-tar', '--log-json', 'repo::archive', '-'), capture=False
|
||||
)
|
||||
insert_execute_command_mock(('borg', 'export-tar', 'repo::archive', '-'), capture=False)
|
||||
|
||||
module.export_tar_archive(
|
||||
dry_run=False,
|
||||
|
||||
Reference in New Issue
Block a user