Compare commits

..

2 Commits

Author SHA1 Message Date
766cd5db4f Merge pull request 'fix: correctly propagate remote command exit status' (#76) from stage into master
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 19m10s
Reviewed-on: #76
2026-03-02 01:04:44 +00:00
9b03cec23e fix: correctly propagate remote command exit status
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-02 00:52:24 +00:00

View File

@@ -97,12 +97,14 @@ remote() {
quoted_cmd="$(printf '%q' "$cmd")"
for candidate in "${candidates[@]}"; do
if ssh $SSH_OPTS "$candidate@$host_ip" "bash -lc $quoted_cmd"; then
ssh $SSH_OPTS "$candidate@$host_ip" "bash -lc $quoted_cmd"
rc=$?
if [ "$rc" -eq 0 ]; then
ACTIVE_SSH_USER="$candidate"
return 0
fi
rc=$?
if [ "$rc" -ne 255 ]; then
return "$rc"
fi