Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arm64 detection logic #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions nodeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,23 +551,28 @@ def get_node_bin_url(version):
'x86': 'x86', # Windows Vista 32
'i686': 'x86',
'x86_64': 'x64', # Linux Ubuntu 64
'amd64': 'x64', # FreeBSD 64bits
'AMD64': 'x64', # Windows Server 2012 R2 (x64)
'amd64': 'x64', # FreeBSD 64bits, Windows Server 2012 R2 (x64)
'armv6l': 'armv6l', # arm
'armv7l': 'armv7l',
'armv8l': 'armv7l',
'aarch64': 'arm64',
'arm64': 'arm64',
'arm64': 'arm64', # macos
'arm64/v8': 'arm64',
'armv8': 'arm64',
'armv8.4': 'arm64',
'ppc64le': 'ppc64le', # Power PC
's390x': 's390x', # IBM S390x
'riscv64': 'riscv64', # RISCV 64
}
# Based on architecture it can return ARM64, aarch64,...
arch = platform.machine().lower()
if arch not in archmap:
msg = f"Unknown architecture {arch} found, unable to determine node " \
"version to use."
raise RuntimeError(msg)
sysinfo = {
'system': platform.system().lower(),
'arch': archmap[platform.machine()],
'arch': archmap[arch],
}
if is_WIN or is_CYGWIN:
postfix = '-win-%(arch)s.zip' % sysinfo
Expand Down
Loading