Skip to content

Commit

Permalink
fix: Correctly catches and raises errors from tw cli
Browse files Browse the repository at this point in the history
Errors were being ignored in the tw cli output because it was checking for "ERROR: " but the error message is actually "ERROR:" with additional ANSI escape codes. This PR removes the space which correctly catches the error.
  • Loading branch information
adamrtalbot committed Dec 20, 2024
1 parent 136ca31 commit 4bca80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seqerakit/seqeraplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _execute_command(self, full_cmd, to_json=False, print_stdout=True):
except json.JSONDecodeError:
pass

if process.returncode != 0 and "ERROR: " in stdout:
if process.returncode != 0 and "ERROR:" in stdout:
self._handle_command_errors(stdout)

if should_print:
Expand Down

0 comments on commit 4bca80b

Please sign in to comment.