mise does not operate well under GitBash on Windows #3961
Unanswered
zartc
asked this question in
Troubleshooting and bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a user of GitBash (which comes with Git for Windows), I installed the 2025.1.0 Windows-x64 (ef6936a 2025-01-01).
The program works fine, but it produces paths that are incompatible with GitBash. Any command that updates the PATH variable (including
eval $(mise activate bash)
) corrupts the GitBash terminal session, rendering it unusable because GitBash cannot find any commands anymore due to the corrupted PATH variable.The problem:
mise outputs paths in Windows format:
C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin
using theC:
prefix, the\
directory separator, and the;
path separator. However, GitBash expects paths to be in Linux format: using/c/
prefix,/
directory separator, and:
path separator.One element of solution:
When running under GitBash ($OSTYPE == "msys"), paths generated by mise should be in Linux format using the
/
and:
separators. In addition, paths pointing to directories inside the GitBash installation directory should be without theC:\Program Files\Git
prefix, so that they are seen as absolute paths inside the Linux VFS. For example,C:\Program Files\Git\mingw64\bin
=>/mingw64/bin
,C:\Program Files\Git\usr\bin
=>/usr/bin
.Beta Was this translation helpful? Give feedback.
All reactions