clawdock 0.3.1 → 0.3.2
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/index.js +17 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -407,11 +407,26 @@ program.command("run <bundle>").description("Pull and run an agent locally").opt
|
|
|
407
407
|
}
|
|
408
408
|
const postInstallScript = path.join(workspaceDir, "scripts", "post-install.sh");
|
|
409
409
|
const postInstallScriptWin = path.join(workspaceDir, "scripts", "post-install.bat");
|
|
410
|
-
|
|
410
|
+
let scriptToRun = null;
|
|
411
|
+
let scriptCmd;
|
|
412
|
+
if (isWindows && fs.existsSync(postInstallScriptWin)) {
|
|
413
|
+
scriptToRun = postInstallScriptWin;
|
|
414
|
+
scriptCmd = `"${postInstallScriptWin}"`;
|
|
415
|
+
} else if (fs.existsSync(postInstallScript)) {
|
|
416
|
+
scriptToRun = postInstallScript;
|
|
417
|
+
if (isWindows) {
|
|
418
|
+
const shPath = postInstallScript.replace(/\\/g, "/");
|
|
419
|
+
scriptCmd = `bash "${shPath}"`;
|
|
420
|
+
} else {
|
|
421
|
+
scriptCmd = `bash "${postInstallScript}"`;
|
|
422
|
+
}
|
|
423
|
+
} else {
|
|
424
|
+
scriptToRun = null;
|
|
425
|
+
scriptCmd = "";
|
|
426
|
+
}
|
|
411
427
|
if (scriptToRun) {
|
|
412
428
|
console.log(`\u{1F4E6} Running post-install script...`);
|
|
413
429
|
try {
|
|
414
|
-
const scriptCmd = isWindows && scriptToRun.endsWith(".bat") ? `"${scriptToRun}"` : `bash "${scriptToRun}"`;
|
|
415
430
|
execSync(scriptCmd, {
|
|
416
431
|
stdio: "inherit",
|
|
417
432
|
cwd: workspaceDir,
|