fix: use absolute path for worktree to prevent nested worktrees
This commit is contained in:
@@ -98,7 +98,9 @@ create_worktree() {
|
||||
branch_name="$worktree_name"
|
||||
fi
|
||||
|
||||
local worktree_path="$WORKTREE_BASE/$worktree_name"
|
||||
local worktree_path_abs
|
||||
worktree_path_abs="$(cd "$WORKTREE_BASE" && pwd)/$worktree_name"
|
||||
local worktree_path="$worktree_path_abs"
|
||||
|
||||
# Cleanup any existing with same name
|
||||
if [[ -d "$worktree_path" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user