-
Notifications
You must be signed in to change notification settings - Fork 481
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
Git Bash issues with CLI tools #390
Comments
I've been playing with I made a workaround for this invalid eval $(fnm env | sed 1d)
export PATH=$(cygpath $FNM_MULTISHELL_PATH):$PATH
if [[ -f .node-version || -f .nvmrc ]]; then
fnm use
fi |
what is |
I mean, currently the path is windows-like if you are on a Windows build, maybe it should differ based on the shell instead? And if that so, should we use |
On MSYS and CygWin, Git for Windows provides a stripped-down version of MSYS. The thing is that MSYS internally uses POSIX paths, and it maintains its own On Windows, every cli command that is installed from node has two versions, e.g. I don't think PowerShell is probably the only one that adapts to the OS (POSIX paths on Linux). |
Was this issue fixed? I've been unable to get fnm working in Git Bash (it works fine in CMD and PowerShell). Even the command 'node' isn't found. Upon checking the output of |
Thanks so much for this workaround; it worked perfectly for me. |
Just a note. |
* allow to automatically enable corepack * update command docs * add changeset * fix clippy * don't show the value of corepack * fix test * test against more shells * Make exec handle errors more nicely * nicer i think * set corepack as debug * fix windows-style paths in Bash #390 * fix clippy * run cygpath on `use` validation too * trim whitespace * fix test? * fix test * add changeset
I can confirm that everything is fine on Git Bash, no need for workarounds: eval "$(fnm env --use-on-cd)" |
Confirmed same: as of v1.34.0, git-bash in Win10 works as designed and documented, making workarounds moot. |
The setup for Git Bash (Windows) cannot run cli tools that are installed using
npm install -g
.Running node works:
But bash is somehow confused about the actual path:
And if I use any cli tool installed with npm, I'll get this:
This can be fixed by making sure that the
PATH
env variable is using Git-Bash paths:The text was updated successfully, but these errors were encountered: