clawmux 0.2.0 → 0.2.1
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/dist/cli.cjs +14 -10
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -348,11 +348,23 @@ async function fileExistsLocal(path) {
|
|
|
348
348
|
return false;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
+
function detectPackageManager() {
|
|
352
|
+
try {
|
|
353
|
+
import_node_child_process.execSync("which bun", { stdio: "pipe" });
|
|
354
|
+
return "bunx";
|
|
355
|
+
} catch {
|
|
356
|
+
return "npx";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
351
359
|
function resolveClawmuxBin() {
|
|
352
360
|
try {
|
|
353
|
-
|
|
361
|
+
const bin = import_node_child_process.execSync("which clawmux", { encoding: "utf-8" }).trim();
|
|
362
|
+
if (bin.includes("/tmp/") || bin.includes("bunx-") || bin.includes("npx-")) {
|
|
363
|
+
return detectPackageManager() === "bunx" ? "bunx clawmux" : "npx clawmux";
|
|
364
|
+
}
|
|
365
|
+
return bin;
|
|
354
366
|
} catch {
|
|
355
|
-
return "npx clawmux";
|
|
367
|
+
return detectPackageManager() === "bunx" ? "bunx clawmux" : "npx clawmux";
|
|
356
368
|
}
|
|
357
369
|
}
|
|
358
370
|
function getHomeDir() {
|
|
@@ -534,14 +546,6 @@ async function checkForUpdate() {
|
|
|
534
546
|
}
|
|
535
547
|
} catch (_) {}
|
|
536
548
|
}
|
|
537
|
-
function detectPackageManager() {
|
|
538
|
-
try {
|
|
539
|
-
import_node_child_process.execSync("which bun", { stdio: "pipe" });
|
|
540
|
-
return "bunx";
|
|
541
|
-
} catch {
|
|
542
|
-
return "npx";
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
549
|
async function update() {
|
|
546
550
|
const pm = detectPackageManager();
|
|
547
551
|
console.log(`[clawmux] Checking for updates...`);
|