Skip to content

Commit

Permalink
Remove —output argument
Browse files Browse the repository at this point in the history
The argument `—output` can’t be used in the binutils which are delivered for the Amazon Linux distribution.

The `cwd=dest` are enough to extract the data.tar.gz file into the right directory.

Signed-off-by: Martin Wilhelmi <mnin@mnin.de>
  • Loading branch information
mnin committed Nov 22, 2022
1 parent 6af7f23 commit efcd9ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/assemble_workflow/bundle_linux_deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def extract(self, dest: str) -> None:
[
'ar',
'-xf',
f'--output={dest}',
self.package_path,
'data.tar.gz'
],
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_assemble_workflow/test_bundle_linux_deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_extract_deb(self, check_call_mock: Mock, shutil_copy2_mock: Mock, shuti
args_list = check_call_mock.call_args_list

self.assertEqual(check_call_mock.call_count, 2)
self.assertEqual(['ar', '-xf', f"--output={self.artifacts_path}", self.package_path, 'data.tar.gz'], args_list[0][0][0])
self.assertEqual(['ar', '-xf', self.package_path, 'data.tar.gz'], args_list[0][0][0])
self.assertEqual(['tar', '-zvxf', '-'], args_list[1][0][0])
self.assertEqual(shutil_copy2_mock.call_count, 0)
self.assertEqual(shutil_move_mock.call_count, 1)
Expand Down

0 comments on commit efcd9ba

Please sign in to comment.