Skip to content

Commit 8efec09

Browse files
authored
fix: Handle terraform crashes (#58)
When Terraform crashes the error code is 11 not 1.
1 parent 61ca131 commit 8efec09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def execute_command(self, cmd, *cmd_args):
579579
raise TerraformTestError('Terraform executable not found: %s' % e)
580580
out, err = p.communicate()
581581
full_output = "".join(full_output_lines)
582-
if retcode == 1:
582+
if retcode in [1, 11]:
583583
message = 'Error running command {command}: {retcode} {out} {err}'.format(
584584
command=cmd, retcode=retcode, out=full_output, err=err)
585585
_LOGGER.critical(message)

0 commit comments

Comments
 (0)