@bivy/bivy 0.16.24-staging.6 → 0.16.24-staging.7
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/bivy.mjs +8 -5
- package/package.json +1 -1
package/bin/bivy.mjs
CHANGED
|
@@ -4360,7 +4360,7 @@ function spawnDetachedUpdateProcess(args, logFd) {
|
|
|
4360
4360
|
"--wait",
|
|
4361
4361
|
"--collect",
|
|
4362
4362
|
`--unit=${unit}`,
|
|
4363
|
-
`--working-directory=${
|
|
4363
|
+
`--working-directory=${os.homedir()}`,
|
|
4364
4364
|
`--property=StandardOutput=${logProp}`,
|
|
4365
4365
|
`--property=StandardError=${logProp}`,
|
|
4366
4366
|
"--setenv=BIVY_UPDATE_DETACHED=1",
|
|
@@ -4378,7 +4378,7 @@ function spawnDetachedUpdateProcess(args, logFd) {
|
|
|
4378
4378
|
}
|
|
4379
4379
|
|
|
4380
4380
|
const child = spawn(nodeBin, updateArgs, {
|
|
4381
|
-
cwd:
|
|
4381
|
+
cwd: os.homedir(),
|
|
4382
4382
|
detached: true,
|
|
4383
4383
|
stdio: ["ignore", logFd, logFd],
|
|
4384
4384
|
env,
|
|
@@ -4463,6 +4463,11 @@ async function runUpdate(args = []) {
|
|
|
4463
4463
|
return;
|
|
4464
4464
|
}
|
|
4465
4465
|
|
|
4466
|
+
// npm and the packaged installer replace the installation directory. Leave
|
|
4467
|
+
// it before updating, including for inline invocations started inside it,
|
|
4468
|
+
// so subsequent subprocesses never inherit a deleted cwd (uv_cwd).
|
|
4469
|
+
process.chdir(os.homedir());
|
|
4470
|
+
|
|
4466
4471
|
// Update along the recorded channel (default `latest`), not a hardcoded tag,
|
|
4467
4472
|
// so a staging box stays on staging instead of silently jumping to production.
|
|
4468
4473
|
const channel = resolveUpdateChannel(args);
|
|
@@ -4480,7 +4485,6 @@ async function runUpdate(args = []) {
|
|
|
4480
4485
|
console.log(c.yellow(`npm reported an issue (exit ${code}). Try: sudo npm i -g @bivy/bivy@${channel}`));
|
|
4481
4486
|
process.exit(code);
|
|
4482
4487
|
}
|
|
4483
|
-
await ensureKnownAgents();
|
|
4484
4488
|
const config = loadConfig();
|
|
4485
4489
|
await waitForIdleSessions(config, { skip: skipWait });
|
|
4486
4490
|
if (hasConfiguredService(config) && (await restartServiceReconciled(config))) {
|
|
@@ -4510,7 +4514,7 @@ async function runUpdate(args = []) {
|
|
|
4510
4514
|
// install.sh reads BIVY_CHANNEL from the env; pass the recorded channel so a
|
|
4511
4515
|
// packaged re-install stays on it (and re-records it) instead of latest.
|
|
4512
4516
|
const code = await run("bash", ["-o", "pipefail", "-c", "curl -fsSL https://bivy.sh/install.sh | bash"], {
|
|
4513
|
-
cwd:
|
|
4517
|
+
cwd: os.homedir(),
|
|
4514
4518
|
env: { ...process.env, BIVY_HOME: repoRoot, BIVY_CHANNEL: channel },
|
|
4515
4519
|
});
|
|
4516
4520
|
// install.sh restarts the service itself; verify the node actually came up
|
|
@@ -4537,7 +4541,6 @@ async function runUpdate(args = []) {
|
|
|
4537
4541
|
process.exitCode = installCode;
|
|
4538
4542
|
return;
|
|
4539
4543
|
}
|
|
4540
|
-
await ensureKnownAgents();
|
|
4541
4544
|
const config = loadConfig();
|
|
4542
4545
|
await waitForIdleSessions(config, { skip: skipWait });
|
|
4543
4546
|
if (hasConfiguredService(config) && (await restartServiceReconciled(config))) {
|
package/package.json
CHANGED