fix(git-guard): use 'exec bash "$0"' for self-re-invocation (exec bit not required) #20
+2
-2
@@ -218,7 +218,7 @@ if [ "$DIRTY" -eq 1 ]; then
|
|||||||
echo "==> Resync succeeded. Reapplying stashed changes..."
|
echo "==> Resync succeeded. Reapplying stashed changes..."
|
||||||
if git stash pop; then
|
if git stash pop; then
|
||||||
echo "==> Stash reapplied cleanly. Re-checking sync state..."
|
echo "==> Stash reapplied cleanly. Re-checking sync state..."
|
||||||
exec "$0" "$@"
|
exec bash "$0" "$@"
|
||||||
else
|
else
|
||||||
echo "ERROR: 'git stash pop' did not complete successfully."
|
echo "ERROR: 'git stash pop' did not complete successfully."
|
||||||
echo
|
echo
|
||||||
@@ -308,7 +308,7 @@ if [ "$DIRTY" -eq 1 ]; then
|
|||||||
|
|
||||||
if git push origin main; then
|
if git push origin main; then
|
||||||
echo "==> Pushed. Re-checking sync state..."
|
echo "==> Pushed. Re-checking sync state..."
|
||||||
exec "$0" "$@"
|
exec bash "$0" "$@"
|
||||||
else
|
else
|
||||||
echo "ERROR: push failed (likely diverged from origin). Aborting deploy."
|
echo "ERROR: push failed (likely diverged from origin). Aborting deploy."
|
||||||
echo "Run:"
|
echo "Run:"
|
||||||
|
|||||||
Reference in New Issue
Block a user