-
Notifications
You must be signed in to change notification settings - Fork 636
RFC: /o:PathOption=CmdToolsMinimal
#653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Delan Azabani <[email protected]>
/o:PathOption=CmdToolsMinimal
this patch fixes #53 by adding bash to PATH in the same way as [github’s own images](https://github.com/actions/runner-images/blob/aab6e2778741c10551dca5dba356433b7fa1a6df/images/windows/scripts/build/Install-Git.ps1#L29). this option doesn’t actually seem to override stock windows tools like `find` and `sort` until you’re _inside_ bash (git-for-windows/build-extra#653), so i think we can do this without any unwanted side effects. <img width="1024" height="768" alt="Screenshot_servo-windows10_2025-11-05_12:23:39" src="https://github.com/user-attachments/assets/4d86bec4-d228-4205-b4ff-259e7977972c" />
I am very hesitant about that:
In any case, |
i’m not sure this is entirely true; when testing that setting on our end (see screenshot above), that said, the rest of your comment kinda makes that moot.
oh, i didn’t know about that, good point!
yep that’s fair, i suspected it might be something sketchy like that :)
also fair enough. would it be reasonable for a dependent project like ours to avoid relying on Bash in Git for Windows by using |
That should work. I do hope that we'll get to a point where MSYS2 distributes a |
|
thanks! i’ll give that a shot :) |

note: this patch is obviously incomplete, but it’s a request for feedback containing the core idea only.
the installer currently has three options for what to add to PATH:
/o:PathOption=Bash) does not add anything/o:PathOption=Cmd) adds[INSTALLFOLDER]cmdonly, allowinggitand friends to be run from anywhere/o:PathOption=CmdTools) also adds[MingwFolder]binand[INSTALLFOLDER]usr\bin, allowing the full suite of unix tools to be run from anywhere/o:PathOption=CmdToolsis useful because it putsbashon PATH, and many “composite actions” (CI subroutines) on GitHub Actions expect to be able to run bash scripts on all platforms (servo/ci-runners#53). GitHub’s first-party CI images use that option, but it clearly has potentially unwanted side effects like overridingfindandsort, so we’re reluctant to use it in our own CI images.but we noticed there’s an
[INSTALLFOLDER]bindirectory with justbash+git+sh, and adding that to PATH allowsbashto be run from anywhere without any side effects. even better, when you’re inside that bash, PATH has access to all of the unix tools anyway (it starts with/mingw64/bin:/usr/bin:).would the option below be compelling to provide in the installer? are there any problems it might cause?
/o:PathOption=CmdToolsMinimal) adds[INSTALLFOLDER]cmdand[INSTALLFOLDER]binonly, allowinggitand friends,sh, andbashto be run from anywhere