fix(shim): Use bash executable directly#5433
Conversation
|
What if no git installed? |
That's precisely the advantage of this PR. Even if git is not installed, the installation of programs like Neofetch will not fail. It will succeed. Users will just see an error while calling neofetch, saying 'bash not found', which will indicate that they need to install something that provides bash (i.e. Git, MSYS2 etc.) Currently the installation of neofetch fails if git isn't found (see linked issue). |
|
I'm sure after this change, shell shim calls WSL's bash.exe stub. I don't if this would be expected but it might cause unexpected behaviors. (comment from reviewing 0.4.0 release changes) |
|
You're right, a range of Windows 10 versions does have WSL's bash executable on PATH, but it was removed by Microsoft a long time ago. If the issue arises, we can tell people what's going on... |
Description
I just realized that when installing Git through the installer, it puts the
bindirectory in PATH, which contains the bash executable.Likewise, when installing Git through Scoop, we create a shim for bash executable: https://github.com/ScoopInstaller/Main/blob/master/bucket/git.json#L40
Motivation and Context
Closes ScoopInstaller/Main#4564
Checklist:
developbranch.