diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 65d07569e8..3ec1e2ed7c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -846,16 +846,16 @@ jobs: echo '-----------------------------------------' /usr/bin/find '/c/Program Files/Microsoft Visual Studio' -type d echo '-----------------------------------------' - /usr/bin/find '/c/Program Files(x86)/Windows Kits' -type d + /usr/bin/find '/c/Program Files (x86)/Windows Kits' -type d echo '-----------------------------------------' MSVC_ROOTD="$(cygpath --dos "$PROGRAMFILES/Microsoft Visual Studio")" # to avoid spaces - MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/2022/Enterprise/vc/tools/msvc")" -mindepth 1 -maxdepth 1 -type d | head -n 1)" + MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/2022/Enterprise/vc/tools/msvc")" -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1)" MSVC_ROOTW="$(cygpath --windows "$MSVC_ROOTU")" MSVC_ROOTU="$(cygpath --unix "$MSVC_ROOTW")" MSVC_BINU="$MSVC_ROOTU/bin/Host$MSVC_HOST/$MATRIX_ARCH" MSDK_ROOTW="$(cygpath --dos "$(printenv 'ProgramFiles(x86)')/Windows Kits")/10" MSDK_ROOTU="$(cygpath --unix "$MSDK_ROOTW")" - MSDK_VER="$(basename "$(/usr/bin/find "$MSDK_ROOTU/lib" -mindepth 1 -maxdepth 1 -type d | head -n 1)")" + MSDK_VER="$(basename "$(/usr/bin/find "$MSDK_ROOTU/lib" -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1)")" MSDK_LIBW="$MSDK_ROOTW/lib/$MSDK_VER" MSDK_INCU="$MSDK_ROOTU/include/$MSDK_VER" MSDK_BINU="$MSDK_ROOTU/bin/$MSDK_VER/$MSVC_HOST"