When nuking a polecat while your shell is cd'd into its worktree, the shell becomes completely broken (even `echo hello` fails). Add a check before deletion that detects if the current working directory is inside the polecat's worktree. If so, return an error with helpful instructions to cd elsewhere first. The check runs ALWAYS, even with --force, because this is about shell safety not data loss. You can't bypass it - just cd out first. Fixes #942
42 KiB
42 KiB