fix(codex): resolve PYTHON_CMD placeholder in hooks.json for Windows#132
Merged
taosu0216 merged 1 commit intomindfold-ai:mainfrom Mar 27, 2026
Merged
Conversation
The codex platform's hooks.json had `python3` hardcoded, but Windows only has `python`. The claude-code and iflow platforms already use `resolvePlaceholders()` for this — codex was simply missed. This fix covers both code paths: - `trellis init --codex` (codex.ts → writeFile) - `trellis update` (index.ts → collectPlatformTemplates) Without the collectPlatformTemplates fix, `trellis update` would detect a false diff between the resolved on-disk file and the raw template.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks.jsonhardcodedpython3, which doesn't exist on Windows (onlypython). Theclaude-codeandiflowplatforms already useresolvePlaceholders()fromshared.ts— codex was simply missed.trellis init --codex(codex.ts) andtrellis update(index.ts→collectPlatformTemplates). Without the latter,trellis updatewould detect a false diff between the resolved on-disk file and the raw template.Changes (4 files)
packages/cli/src/templates/codex/hooks.jsonpython3→{{PYTHON_CMD}}placeholderpackages/cli/src/configurators/codex.tsresolvePlaceholders()when writing hooks.json during initpackages/cli/src/configurators/index.tsresolvePlaceholders()incollectPlatformTemplates("codex")for update trackingpackages/cli/test/configurators/platforms.test.tsTest plan
vitest run test/configurators/platforms.test.ts— 41/41 passedtrellis init --codexon Windows → verify.codex/hooks.jsoncontains"python"not"python3"trellis updateafter init → no false diff reported for hooks.json