fix(git-guard): use 'exec bash "$0"' for self-re-invocation (exec bit not required) #20

Merged
AVB merged 1 commits from fix-git-guard-exec-permission into main 2026-09-09 19:36:31 -07:00
+2 -2
View File
@@ -218,7 +218,7 @@ if [ "$DIRTY" -eq 1 ]; then
echo "==> Resync succeeded. Reapplying stashed changes..."
if git stash pop; then
echo "==> Stash reapplied cleanly. Re-checking sync state..."
exec "$0" "$@"
exec bash "$0" "$@"
else
echo "ERROR: 'git stash pop' did not complete successfully."
echo
@@ -308,7 +308,7 @@ if [ "$DIRTY" -eq 1 ]; then
if git push origin main; then
echo "==> Pushed. Re-checking sync state..."
exec "$0" "$@"
exec bash "$0" "$@"
else
echo "ERROR: push failed (likely diverged from origin). Aborting deploy."
echo "Run:"