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:
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user