From 9d72dceac64b04e30069c7a5dca20f4f09e10961 Mon Sep 17 00:00:00 2001 From: denusklo <79653229+denusklo@users.noreply.github.com> Date: Wed, 9 Sep 2026 04:47:04 +0800 Subject: [PATCH] Detect the system when OS is Windows_NT (#7989) Since we assume only Windows would set this value, we just run OS detection rather than trying to normalize it to `windows`. --- ci/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/lib.sh b/ci/lib.sh index 7c1f0d9e5..bd9c5c9c0 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -49,7 +49,10 @@ if [[ ! ${ARCH-} ]]; then export ARCH fi -if [[ ! ${OS-} ]]; then +# Windows predefines OS as Windows_NT for every process, so on a windows shell +# the check below would always find a value and never call os(). That is not a +# name this build knows, so it does not count as one the caller chose. +if [[ ! ${OS-} || ${OS-} == "Windows_NT" ]]; then OS=$(os) export OS fi