Skip to content

Commit

Permalink
fix: async run should not default to exit code of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
uptickmetachu committed Sep 10, 2024
1 parent 186c324 commit 3495a72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
web:
build: .
Expand Down
2 changes: 1 addition & 1 deletion gitops_server/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def run(command, suppress_errors=False) -> RunOutput:
)

stdout, stderr = await proc.communicate()
exit_code = proc.returncode or 1
exit_code = proc.returncode if proc.returncode not in (None, 128) else 1 # type: ignore
if exit_code == 0:
return RunOutput(exit_code=exit_code, output=stdout.decode())
else:
Expand Down

0 comments on commit 3495a72

Please sign in to comment.