Make the prebuild step work on Windows - #770
Open
aramfachan wants to merge 1 commit into
Open
aramfachan wants to merge 1 commit into
aramfachan wants to merge 1 commit into
Conversation
npm runs package scripts with cmd.exe on Windows, where `mkdir -p` is
not a flag: `npm run build` created a directory literally named "-p"
next to the real one. Create the generated-types directory with
`node -e "require('node:fs').mkdirSync(..., {recursive: true})"`,
which behaves the same under cmd.exe and POSIX shells.
Verified on Windows 11 (cmd.exe as npm script shell, Node 24.18,
codex-cli 0.155.0-alpha): `npm run build` generates the app-server
types and `tsc -p tsconfig.app-server.json` succeeds, with no stray
"-p" directory. Also verified under Git Bash.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Edo771977
added a commit
to Edo771977/codex-plugin-cc
that referenced
this pull request
Sep 20, 2026
Import openai#770 so the build survives a second run on Windows
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.
Problem
npm runs package scripts with
cmd.exeon Windows, andcmd.exedoes not understandmkdir -p:creates a stray directory literally named
-pnext to the real one. CI only runs onubuntu-latest, so this goes unnoticed.Change
One line in
package.json:prebuildcreates the generated-types directory withIt behaves the same under
cmd.exeand POSIX shells, and Node is already a requirement.Verification
Windows 11, Node 24.18, codex-cli 0.155.0-alpha, starting from a deleted
plugins/codex/.generated:npm run build-pdircmd.exe(npm default on Windows)tscOKtscOKNo behavior change on Linux/macOS.
Related Windows work already in flight (not duplicated here)
While checking for duplicates, I found these open PRs that already cover the other Windows issues I hit when running the suite on Windows 11 (es-ES):
taskkillthrough Git Bash / localized "not found" / partial/Tkills: Do not run taskkill through a shell on Windows #735, fix: make cancel work under Git Bash on a non-English Windows (#423) #577, fix: Windows SHELL env var breaks taskkill; handleCancel aborts before updating job state on a partial kill failure #656CLAUDE_PLUGIN_DATA/CODEX_COMPANION_*: fix(tests): keep the suite hermetic inside a live Claude Code session #456USERPROFILEvsHOMEin the transfer tests: fix: support relocated Claude config transfers #729With those fixes and this one applied locally, the suite gives 93 pass, 0 fail, 2 skipped on Windows 11 (es-ES), and the build succeeds.
🤖 Generated with Claude Code