1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-24 20:30:54 +00:00

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 2025-12-01 23:44:49 +00:00
parent dda54c1154
commit fb6ad44ca8

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