Skip to content

Commit

Permalink
cli: set non-zero return code for canceled status
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassan1 committed Jan 7, 2025
1 parent 9a5ed20 commit 3cdec07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions awxkit/awxkit/cli/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def monitor(self, response, **kwargs):
status = mon(response, self.page.connection.session, **monitor_kwargs)
if status:
response.json['status'] = status
if status in ('failed', 'error'):
if status in ('failed', 'error', 'canceled'):
setattr(response, 'rc', 1)
return response

Expand Down Expand Up @@ -559,7 +559,7 @@ def perform(self, **kwargs):
)
if status:
response.json['status'] = status
if status in ('failed', 'error'):
if status in ('failed', 'error', 'canceled'):
setattr(response, 'rc', 1)
else:
return 'Unable to monitor finished job'
Expand Down

0 comments on commit 3cdec07

Please sign in to comment.