mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(worktree): auto-run yarn install on new worktrees
Add a Claude Code SessionStart hook (matcher: startup) that runs `corepack yarn install` when node_modules is missing, so worktrees Claude creates internally are immediately usable. Also extend create-task-worktree.sh to install deps after the worktree is created, covering Codex/Cursor/manual flows that share that script.
This commit is contained in:
@@ -60,6 +60,12 @@ echo "Creating branch $branch_name from $base_ref"
|
||||
echo "Creating worktree at $worktree_path"
|
||||
git worktree add "$worktree_path" -b "$branch_name" "$base_ref"
|
||||
|
||||
if [ -f "$worktree_path/yarn.lock" ]; then
|
||||
echo ""
|
||||
echo "Installing dependencies in new worktree (corepack yarn install)..."
|
||||
(cd "$worktree_path" && corepack yarn install)
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Worktree ready."
|
||||
echo "Branch: $branch_name"
|
||||
|
||||
Reference in New Issue
Block a user