git:checkout-worktree: Echo non-zero exit code
This commit is contained in:
@@ -54,12 +54,14 @@ trap '
|
|||||||
pushd -q "$WORKTREE_PATH"
|
pushd -q "$WORKTREE_PATH"
|
||||||
|
|
||||||
"$SHELL" && errc=$? || errc=$?
|
"$SHELL" && errc=$? || errc=$?
|
||||||
|
(( !errc )) || echo "shell exited with $errc"
|
||||||
|
|
||||||
# Restart the shell (forcefully interactive) until the worktree is removed
|
# Restart the shell (forcefully interactive) until the worktree is removed
|
||||||
until [[ ! -e "$WORKTREE_PATH" ]] || git worktree remove "$WORKTREE_PATH"; do
|
until [[ ! -e "$WORKTREE_PATH" ]] || git worktree remove "$WORKTREE_PATH"; do
|
||||||
[[ -t 0 ]] ||
|
[[ -t 0 ]] ||
|
||||||
>&2 printf "Dropping into interactive shell to resolve conflicts\n"
|
>&2 printf "Dropping into interactive shell to resolve conflicts\n"
|
||||||
"$SHELL" -i && errc=$? || errc=$?
|
"$SHELL" -i && errc=$? || errc=$?
|
||||||
|
(( !errc )) || echo "shell exited with $errc"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Reset traps and PWD
|
# Reset traps and PWD
|
||||||
|
|||||||
Reference in New Issue
Block a user