open-agents-ai 0.30.5 → 0.30.6
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/preinstall.cjs +17 -3
- package/package.json +1 -1
package/dist/preinstall.cjs
CHANGED
|
@@ -203,12 +203,26 @@ function doReinstall() {
|
|
|
203
203
|
}
|
|
204
204
|
console.log("");
|
|
205
205
|
console.log(" ┌─────────────────────────────────────────────────┐");
|
|
206
|
-
console.log(" │ Done!
|
|
206
|
+
console.log(" │ Done! Launching open-agents... │");
|
|
207
207
|
console.log(" └─────────────────────────────────────────────────┘");
|
|
208
208
|
console.log("");
|
|
209
209
|
rl.close();
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
|
|
211
|
+
// Auto-source shell config and launch oa — no "open a new terminal" needed
|
|
212
|
+
var rcFile2 = shell.indexOf("zsh") !== -1 ? "~/.zshrc" : "~/.bashrc";
|
|
213
|
+
var relaunchCmd = 'export NVM_DIR="' + nvmDir + '" && ' +
|
|
214
|
+
'[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && ' +
|
|
215
|
+
"source " + rcFile2 + " 2>/dev/null; " +
|
|
216
|
+
"exec oa";
|
|
217
|
+
try {
|
|
218
|
+
childProcess.execSync(shell + " -c '" + relaunchCmd + "'", {
|
|
219
|
+
stdio: "inherit",
|
|
220
|
+
env: process.env,
|
|
221
|
+
});
|
|
222
|
+
} catch (e2) {
|
|
223
|
+
console.log("\n If oa didn't launch, run: source " + rcFile2 + " && oa\n");
|
|
224
|
+
}
|
|
225
|
+
process.exit(0);
|
|
212
226
|
});
|
|
213
227
|
}
|
|
214
228
|
|
package/package.json
CHANGED