➜ gtr rm $(basename $PWD)
==> Removing worktree: XXX
==> Running preRemove hooks...
[OK] Hook 1: test -L bazel-out && bazel clean --expunge && bazel shutdown || true
[OK] Hook 1 completed successfully
[x] Failed to remove worktree: fatal: '.../XXX' contains modified or untracked files, use --force to delete it
➜ echo $?
0
I used gtr rm $(basename $PWD) && exit and expected that it will not close in this case
I used
gtr rm $(basename $PWD) && exitand expected that it will not close in this case