MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_node_download_info

Function get_node_download_info

ci/setup-js-linting-fast.py:41–67  ·  view source on GitHub ↗

Get Node.js download URL and filename based on platform

()

Source from the content-addressed store, hash-verified

39
40
41def get_node_download_info():
42 """Get Node.js download URL and filename based on platform"""
43 system = platform.system().lower()
44 machine = platform.machine().lower()
45
46 # Map architecture names
47 if machine in ["x86_64", "amd64"]:
48 arch = "x64"
49 elif machine in ["aarch64", "arm64"]:
50 arch = "arm64"
51 else:
52 raise ValueError(f"Unsupported architecture: {machine}")
53
54 if system == "windows":
55 filename = f"node-v{NODE_VERSION}-win-{arch}.zip"
56 is_zip = True
57 elif system == "darwin":
58 filename = f"node-v{NODE_VERSION}-darwin-{arch}.tar.gz"
59 is_zip = False
60 elif system == "linux":
61 filename = f"node-v{NODE_VERSION}-linux-{arch}.tar.xz"
62 is_zip = False
63 else:
64 raise ValueError(f"Unsupported platform: {system}")
65
66 url = f"https://nodejs.org/dist/v{NODE_VERSION}/{filename}"
67 return url, filename, is_zip
68
69
70def download_and_extract_node():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected