brson/multirust

Support of Git for Windows

Opened this issue · 3 comments

Multirust isn't installed in Git for Windows bash (MINGW64_NT-6.1) because /usr/local doesn't exists. Git installer doesn't create such directories. The root is set to git installation directory ("C:\Program Files\Git" by default). Could you please change installation folder to another one? %LOCALAPPDATA% is good enough for one user usage.

brson commented

Thanks for the report. This will require updating the install.sh script I think.

brson commented

Oh, also probably some compatibility code to deal with existing msys /usr/local installs.

Unfortunately $LOCALAPPDATA/multirust isn't in the $PATH. Msys2 defines $PATH as

/usr/local/bin:/usr/bin:/bin:/opt/bin:<user paths>

Git for Windows:

<user home>/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/mingw32/bin:/usr/bin:<user paths>

/usr/local/bin is in the both paths, but in Git for Windows writing requires admin rights (sudo doesn't exists and doesn't work I suppose). I also don't think, installing to the Git application directory is a good idea.
We could try to install multirust to /usr/local/bin if installer has enough rights to do so or to $HOME/bin if it's in the $PATH. It looks backward compatible and correct for both Windows and Linux.

The issue isn't very critical as multirust can be installed with admin privileges.