Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix: make setup-worktree preserve existing .env.worktree

Jiayuancbfb7d58b63a
diff --git a/Makefile b/Makefile
index 95da231522..3543116369 100644
--- a/Makefile
+++ b/Makefile
@@ -98,8 +98,12 @@ check-main:
@ENV_FILE=$(MAIN_ENV_FILE) bash scripts/check.sh
setup-worktree:
- @echo "==> Generating $(WORKTREE_ENV_FILE) with unique ports..."
- @FORCE=1 bash scripts/init-worktree-env.sh $(WORKTREE_ENV_FILE)
+ @if [ ! -f "$(WORKTREE_ENV_FILE)" ]; then \
+ echo "==> Generating $(WORKTREE_ENV_FILE) with unique ports..."; \
+ bash scripts/init-worktree-env.sh $(WORKTREE_ENV_FILE); \
+ else \
+ echo "==> Using existing $(WORKTREE_ENV_FILE)"; \
+ fi
@$(MAKE) setup ENV_FILE=$(WORKTREE_ENV_FILE)
start-worktree: