Skip to content

Commit 19f3dc2

Browse files
committed
fix: detect Windows ARM64 architecture correctly in build script
1 parent e162f73 commit 19f3dc2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build-pkgs.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ if [ "Windows_NT" = "${OS}" ]; then ## windows compatibility shims
4343
else
4444
PLATFORM=$(uname -s | tr 'A-Z' 'a-z')
4545
fi
46-
ARCH=$(uname -m)
46+
# On Windows, use MSYSTEM_CARCH if set (correctly identifies ARM64)
47+
# Otherwise fall back to uname -m (works correctly on Linux/macOS)
48+
if [ "Windows_NT" = "${OS}" ] && [ -n "${MSYSTEM_CARCH}" ]; then
49+
ARCH="${MSYSTEM_CARCH}"
50+
else
51+
ARCH=$(uname -m)
52+
fi
4753
DDVER=$(grep __version__ dnsdiag/shared.py | awk -F\' '{print $2}')
4854
[ -z "${DDVER}" ] && die "Failed to extract version number from dnsdiag/shared.py"
4955
PKG_NAME="dnsdiag-${DDVER}.${PLATFORM}-${ARCH}-bin"

0 commit comments

Comments
 (0)