Skip to content

Commit e11d3ec

Browse files
Update scripts/new-worktree.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 982ad66 commit e11d3ec

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/new-worktree.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ fi
1515
# Create the worktree and branch
1616
git worktree add -b $BRANCH $WORKTREE_DIR main
1717

18-
# Copy .vscode
19-
cp -r "$MAIN_REPO/.vscode" "$WORKTREE_DIR/.vscode"
18+
# Copy .vscode if present
19+
if [ -d "$MAIN_REPO/.vscode" ]; then
20+
cp -r "$MAIN_REPO/.vscode" "$WORKTREE_DIR/.vscode"
21+
else
22+
echo "ℹ️ No .vscode directory found in main repo, skipping copy."
23+
fi
2024

2125
# Copy all .env files
2226
for env_file in "$MAIN_REPO"/.env*; do

0 commit comments

Comments
 (0)