Skip to content

Commit

Permalink
Fix exit code in custom workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondbutcher committed Apr 6, 2020
1 parent 05283cf commit 5a7d3f1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pretf/pretf/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ def custom(
# passing in "path" and "terraform" if required.
result = call_pretf_function(func=module.pretf_workflow, context=context) # type: ignore

if not isinstance(result, CompletedProcess):

result = CompletedProcess(args=[str(path)], returncode=1)
if isinstance(result, int):
result = CompletedProcess(args=[str(path)], returncode=result)

return result

Expand Down

0 comments on commit 5a7d3f1

Please sign in to comment.