@hanzo/cli 8.5.1339 → 8.5.1341
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/install.js +11 -1
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -28,7 +28,7 @@ const REPO = "hanzoai/cli";
|
|
|
28
28
|
const TOOLS = {
|
|
29
29
|
hanzo: { repo: "hanzoai/cli", bin: "hanzo", alias: "hanzo-cli", versioned: true },
|
|
30
30
|
mcp: { repo: "hanzoai/mcp", bin: "hanzo-mcp", alias: "mcp" },
|
|
31
|
-
dev: { repo: "hanzoai/dev
|
|
31
|
+
dev: { repo: "hanzoai/dev", bin: "dev", alias: "", fallbackTag: "rust-v0.7.26" },
|
|
32
32
|
gen: { repo: "hanzoai/gen", bin: "gen", alias: "hanzo-gen" },
|
|
33
33
|
zt: { repo: "hanzozt/zt", bin: "zt", alias: "hanzo-zet" },
|
|
34
34
|
engine: { repo: "hanzoai/engine", bin: "hanzo-engine", alias: "hanzoai", kind: "engine" },
|
|
@@ -260,6 +260,16 @@ async function installOne(name, { key, target, dest, ext, optional }) {
|
|
|
260
260
|
dest,
|
|
261
261
|
ext,
|
|
262
262
|
});
|
|
263
|
+
} else if (tool.fallbackTag && String(err.message || err).startsWith("404 ")) {
|
|
264
|
+
fellBack = true;
|
|
265
|
+
await fetchStandardTool({
|
|
266
|
+
base: `https://github.com/${tool.repo}/releases/download/${tool.fallbackTag}`,
|
|
267
|
+
bin: tool.bin,
|
|
268
|
+
alias: tool.alias,
|
|
269
|
+
target,
|
|
270
|
+
dest,
|
|
271
|
+
ext,
|
|
272
|
+
});
|
|
263
273
|
} else {
|
|
264
274
|
throw err;
|
|
265
275
|
}
|