@aerostack/cli 1.3.2 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +11 -2
- package/package.json +1 -1
package/bin/run.js
CHANGED
|
@@ -87,7 +87,7 @@ async function getInstalledVersion(binPath) {
|
|
|
87
87
|
|
|
88
88
|
async function ensureBinary() {
|
|
89
89
|
const binPath = path.join(INSTALL_DIR, process.platform === "win32" ? `${BINARY}.exe` : BINARY);
|
|
90
|
-
const { asset } = getPlatform();
|
|
90
|
+
const { platform, arch, asset } = getPlatform();
|
|
91
91
|
const latestVersion = await getLatestVersion();
|
|
92
92
|
|
|
93
93
|
if (fs.existsSync(binPath)) {
|
|
@@ -98,7 +98,16 @@ async function ensureBinary() {
|
|
|
98
98
|
console.error(`Downloading Aerostack CLI v${latestVersion}...`);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
try {
|
|
102
|
+
return await downloadBinary(latestVersion, asset);
|
|
103
|
+
} catch (err) {
|
|
104
|
+
// Windows on ARM64 can run x64 binaries via emulation.
|
|
105
|
+
// If arm64 artifact is unavailable, fall back to windows_amd64.
|
|
106
|
+
if (platform === "win32" && arch === "arm64" && asset === "windows_arm64") {
|
|
107
|
+
return downloadBinary(latestVersion, "windows_amd64");
|
|
108
|
+
}
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
async function main() {
|