fix: bug: generate_compose() emits unresolved ${PROJECT_NAME} in PROJECT_REPO_ROOT (#518)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/pr/smoke-init Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-09 19:39:18 +00:00
parent 471b0b053a
commit 09719aa635

View file

@ -241,6 +241,10 @@ networks:
driver: bridge
COMPOSEEOF
# Patch PROJECT_REPO_ROOT — interpolate PROJECT_NAME at generation time
# (Docker Compose cannot resolve it; it's a shell variable, not a .env var)
sed -i "s|\${PROJECT_NAME:-project}|${PROJECT_NAME}|g" "$compose_file"
# Patch the Claude CLI binary path — resolve from host PATH at init time.
local claude_bin
claude_bin="$(command -v claude 2>/dev/null || true)"