Rubén Justo <rjusto@xxxxxxxxx> writes: > + test_when_finished " > -+ git worktree remove wt1 && > -+ git worktree remove wt2 && > -+ git branch -d shared > -+ git checkout - > ++ git worktree remove wt1 ||: > ++ git worktree remove wt2 ||: > ++ git checkout - ||: > ++ git branch -D shared ||: > + " && Sorry, but I do not get the point of this construct. The test_cleanup variable that accumulates test_when_finished scripts is evaled without -e shopt set, so you can just remove all these ||: and add a single "true" at the end, like ... git checkout - git branch -D shared : " && for exactly the same effect, no?