Extra anti-WSL protection

On a machine with Windows Subsystem for Linux installed, the first bash in the path will typically be the WSL launcher that gives Linux bash.

We must therefore ensure we recursively call into the MSYS2 shell we're already using.
This commit is contained in:
AnyOldName3
2026-01-01 18:44:34 +00:00
parent dda54c1154
commit fb6ad44ca8
+1 -1
View File
@@ -32,7 +32,7 @@ command -v unixPathAsWindows >/dev/null 2>&1 || function unixPathAsWindows {
# capture CMD environment in a shell with MSVC activated
cmd //c "$(unixPathAsWindows "$(dirname "${BASH_SOURCE[0]}")")\ActivateMSVC.bat" "&&" "bash" "-c" "declare -px > declared_env.sh"
cmd //c "$(unixPathAsWindows "$(dirname "${BASH_SOURCE[0]}")")\ActivateMSVC.bat" "&&" "$(unixPathAsWindows $BASH)" "-c" "declare -px > declared_env.sh"
source ./declared_env.sh
rm declared_env.sh