Skip to content

Commit

Permalink
Merge pull request #110 from victormlg/CFE-4480-handle-errors-in-deploy
Browse files Browse the repository at this point in the history
Fixed error handling in deploy
  • Loading branch information
olehermanse authored Jan 9, 2025
2 parents a22a1d7 + fd2af09 commit cc2f809
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cf_remote/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ def deploy_masterfiles(host, tarball, *, connection=None):
]
combined = " && ".join(commands)
print("Running: '%s'" % combined)
ssh_sudo(connection, combined)
result = ssh_sudo(connection, combined, errors=True)

if result is None:
log.error("Command failed, policy failed to deploy")
return 1
print("Policy set successfully deployed to '%s' 🚀" % host)
return 0

0 comments on commit cc2f809

Please sign in to comment.