diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 106cbbfac4..848f96c164 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -441,7 +441,7 @@ if ! [ -z $ACTIVATE_MSVC ]; then originalCmdEnv["${separatedPair[0]}"]="${separatedPair[1]}" done - MSVC_INSTALLATION_PATH=$(vswhere -legacy -version [$MSVC_VER,$(awk "BEGIN { print $MSVC_VER + 1; exit }")\) -property installationPath) + MSVC_INSTALLATION_PATH=$(vswhere -legacy -version "[$MSVC_VER,$(awk "BEGIN { print $MSVC_REAL_VER + 1; exit }"))" -property installationPath) # capture CMD environment in a shell with MSVC activated if [ $MSVC_REAL_VER -ge 15 ]; then cmdEnv="$(cmd //c "${MSVC_INSTALLATION_PATH}\Common7\Tools\VsDevCmd.bat" -no_logo -arch=$([ $BITS -eq 64 ] && echo "amd64" || echo "x86") -host_arch=$([ $(uname -m) == 'x86_64' ] && echo "amd64" || echo "x86") "&&" set)"