fix: Fix Codex integration on Windows by using platform-specific path separators #134
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
Fixes #132 - Codex integration was not working on Windows during
initandupdatecommands.Problem
The
FILE_PATHSconstant incodex.tswas using hardcoded forward slashes (/), which causedpath.basename()to fail on Windows.On Windows,
path.basename()expects backslashes as path separators. When given a path with forward slashes like.codex/prompts/openspec-proposal.md, it would return the entire string instead of extracting just the filenameopenspec-proposal.md.This broke:
openspec init(would show Codex as not configured even when it was)resolveAbsolutePath()which created incorrect file pathsisToolConfigured()Solution
Changed
FILE_PATHSto usepath.join()which automatically uses the correct platform-specific path separators:.codex\prompts\openspec-proposal.md(backslashes).codex/prompts/openspec-proposal.md(forward slashes)Test plan
openspec initon Windows 11 and verify Codex is detected correctlyopenspec updateon Windows 11 and verify prompts are updatedC:\Users\<USERNAME>\.codex\prompts🤖 Generated with Claude Code