Compare commits

...

2 Commits

Author SHA1 Message Date
shokollm
28b343f817 fix: worktree created in wrong directory (issue #185)
cmd_start was calling create_worktree without passing $WORKTREES_DIR,
causing worktrees to be created in $PWD (daemon's working directory)
instead of ~/.kugetsu-worktrees/
2026-04-06 05:18:31 +00:00
shokollm
836fde07fc fix: destroy --base -y fails with 'target is required' (issue #183)
Removed erroneous code that set target="" when target="--base".
This caused the early exit at 'if [ -z "$target" ]' to trigger
before reaching the actual --base handling at line 517.
2026-04-06 04:14:03 +00:00

View File

@@ -246,7 +246,7 @@ cmd_start() {
local before_sessions=$(opencode session list 2>/dev/null | grep -oP '^ses_\w+' | sort)
local before_set="|$before_sessions|"
create_worktree "$issue_ref"
create_worktree "$issue_ref" "$WORKTREES_DIR"
local after_sessions=$(opencode session list 2>/dev/null | grep -oP '^ses_\w+' | sort)
local new_session_id=""
@@ -479,10 +479,6 @@ cmd_destroy() {
local target="${1:-}"
local force=false
if [ "$target" = "--base" ]; then
target=""
fi
if [ "$2" = "-y" ]; then
force=true
fi