Skip to content

Commit

Permalink
Merge pull request #77 from angulo-solido:73-fix-init-when-changing-env
Browse files Browse the repository at this point in the history
Not failling when failling to init one of the sites when changing ENV
  • Loading branch information
MiguelNdeCarvalho authored Jul 13, 2022
2 parents 1260fbe + bac8193 commit 56f3c65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terrabutler/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def terraform_command_runner(command, site, args=[], options=[],
try:
p = subprocess.Popen(args=command, cwd=site_dir)
p.wait()

if p.returncode != 0:
print(Fore.RED + "There was an error while running the terraform"
" command.")
exit(1)
except KeyboardInterrupt:
p.send_signal(signal.SIGINT)
p.wait()
Expand Down

0 comments on commit 56f3c65

Please sign in to comment.