In the "export-tar" action, fix the use of "--log-json" when exporting to stdout (#485).

This commit is contained in:
Dan Helfman
2026-01-09 12:12:42 -08:00
parent 528dc6fe87
commit 4e6319f5d3
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -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 ())
+1 -3
View File
@@ -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,