Skip to content

Commit

Permalink
fix: Handle terraform crashes (#58)
Browse files Browse the repository at this point in the history
When Terraform crashes the error code is 11 not 1.
  • Loading branch information
grahamhar authored Sep 23, 2022
1 parent 61ca131 commit 8efec09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def execute_command(self, cmd, *cmd_args):
raise TerraformTestError('Terraform executable not found: %s' % e)
out, err = p.communicate()
full_output = "".join(full_output_lines)
if retcode == 1:
if retcode in [1, 11]:
message = 'Error running command {command}: {retcode} {out} {err}'.format(
command=cmd, retcode=retcode, out=full_output, err=err)
_LOGGER.critical(message)
Expand Down

0 comments on commit 8efec09

Please sign in to comment.