Repository navigation
fix: run the auto-install postinstall on Windows too - #39
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n PATH The Windows runner has Git's Unix tools on PATH, so `test` worked there and the test could not see what a user's Windows does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm runs scripts with cmd.exe on Windows, which has no `test`, so the postinstall always printed "Skipping install" there and EDGEDRIVER_AUTO_INSTALL / GECKODRIVER_AUTO_INSTALL did nothing. A node check replaces `test -f`; a failed download still does not fail the install. The READMEs now say that pnpm 10+, Bun and recent npm want the package approved for install scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plum117
marked this pull request as ready for review
October 9, 2026 20:15
|
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.
Why
npm runs install scripts with
cmd.exeon Windows, andcmd.exehas notestcommand. Thepostinstallscript started withtest -f ./dist/install.js, so on a typical Windows machine it always printed "Skipping install, project not built!", andEDGEDRIVER_AUTO_INSTALL/GECKODRIVER_AUTO_INSTALLdid nothing.The GitHub Windows runner has Git's Unix tools (
test.exe) onPATH, so CI did not show it: the first test commit passed on Windows. WithPATHlimited to Node.js andSystem32, as on a user's machine, the test fails on Windows on the old script (run:runs dist/install.js when it is built, on every OSfailed in both packages).Change
postinstall: anode -echeck replacestest -f. It works inshandcmd.exe. As before, it prints "Skipping install, project not built!" whendistis missing (the workspace install), and a failed download still does not fail the install.pnpm approve-builds,trustedDependencies), and npm 11 warns untilnpm install-scripts approve <package>. If the download fails, the driver downloads on first use.Test plan
tests/postinstall.test.tsin edgedriver and geckodriver: run the real script with npm's default shell and a minimalPATH. Red on Windows CI with the old script, green on macOSEDGEDRIVER_AUTO_INSTALL=1 npm i <packed tarball>(npm 11.19): the driver downloads during the install🤖 Generated with Claude Code