Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gen3/tools/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run_command(self):
f"Running the command {self.command_args} with gen3 access token in environment variable"
)
try:
subprocess.run(cmd, stderr=subprocess.STDOUT)
subprocess.run(cmd, stderr=subprocess.STDOUT, check=True)
except Exception as e:
logger.error(f"ERROR while running '{cmd}':", e)
raise
4 changes: 3 additions & 1 deletion tests/test_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def test_gen3_wrap_valid_auth(mock_gen3_auth):
with patch("gen3.tools.wrap.subprocess.run") as mock_subprocess_run:
wrapper_obj = Gen3Wrap(mock_gen3_auth, test_command_args)
wrapper_obj.run_command()
mock_subprocess_run.assert_called_once_with(list(test_command_args), stderr=-2)
mock_subprocess_run.assert_called_once_with(
list(test_command_args), stderr=-2, check=True
)


@patch.object(Gen3Auth, "get_access_token", MagicMock(side_effect=Gen3AuthError()))
Expand Down
Loading