Skip to content

Commit

Permalink
Fixed error handling in deploy
Browse files Browse the repository at this point in the history
Ticket: CFE-4480
Signed-off-by: Victor Moene <[email protected]>
  • Loading branch information
victormlg committed Jan 9, 2025
1 parent a22a1d7 commit fd2af09
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 fd2af09

Please sign in to comment.