fix(gbrain-install): skip postinstall scripts on Windows MSYS/Cygwin#1487
Open
genisis0x wants to merge 1 commit into
Open
fix(gbrain-install): skip postinstall scripts on Windows MSYS/Cygwin#1487genisis0x wants to merge 1 commit into
genisis0x wants to merge 1 commit into
Conversation
bun install in fails on Windows MSYS/Cygwin shells because gbrain's native postinstall script mis-parses path arguments and aborts with a non-zero exit, breaking gstack-gbrain-install for Windows users running git-bash/MSYS2. The package installs cleanly without scripts. Detect MINGW/MSYS/CYGWIN/Windows_NT via uname -s and pass --ignore-scripts to bun install on those shells. macOS and Linux paths unchanged. Refs garrytan#1271
4fd4efe to
7e27fef
Compare
Author
|
Rebased on latest main to clear stale-against-1.38.0.0. Worth flagging this PR is scope-distinct from the v1.38.0.0 Windows install hardening that just landed in #1505:
Different file, different failure mode, no overlap with the symlink invariant |
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
Fixes #1271 (quirk 1):
gstack-gbrain-installaborts on Windows MSYS/Cygwin shells becausebun installruns gbrain's native postinstall script, which mis-parses Windows-style path arguments and exits non-zero. The package itself installs cleanly without scripts, so this PR detects Windows shells (uname -smatchesMINGW*|MSYS*|CYGWIN*|Windows_NT) and passes--ignore-scriptstobun installon those platforms only. macOS and Linux paths are untouched.The follow-up
bun linkstep is unaffected by--ignore-scripts(link runs its own lifecycle), so the resultinggbrainCLI on PATH still works as before. D19 PATH-shadow validation downstream of the install also continues to apply unchanged.Scope
bin/gstack-gbrain-installIssue #1271 lists three quirks; this PR addresses only quirk 1. The remaining two (path normalization in
~/.bashrcappend, and ttyd/screen probe on Git-bash) are out of scope here.Test plan
bash bin/gstack-gbrain-install --dry-runstill prints expected plan (no change)bun install --silent(no--ignore-scripts)uname -s: confirmbun install --silent --ignore-scriptsbranch is taken-nsyntax check passes (verified locally)