@rehpic/vcli 0.1.0-beta.75.1 → 0.1.0-beta.76.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/index.js +0 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3362,34 +3362,12 @@ function killExistingMenuBar() {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
3364
|
}
|
|
3365
|
-
function getRunningMenuBarPid() {
|
|
3366
|
-
if (!existsSync3(MENUBAR_PID_FILE)) {
|
|
3367
|
-
return null;
|
|
3368
|
-
}
|
|
3369
|
-
try {
|
|
3370
|
-
const pid = Number(readFileSync2(MENUBAR_PID_FILE, "utf-8").trim());
|
|
3371
|
-
if (Number.isFinite(pid) && pid > 0 && isKnownMenuBarProcess(pid)) {
|
|
3372
|
-
process.kill(pid, 0);
|
|
3373
|
-
return pid;
|
|
3374
|
-
}
|
|
3375
|
-
} catch {
|
|
3376
|
-
}
|
|
3377
|
-
try {
|
|
3378
|
-
unlinkSync(MENUBAR_PID_FILE);
|
|
3379
|
-
} catch {
|
|
3380
|
-
}
|
|
3381
|
-
return null;
|
|
3382
|
-
}
|
|
3383
3365
|
async function launchMenuBar() {
|
|
3384
3366
|
if (platform() !== "darwin") return;
|
|
3385
3367
|
removeLegacyMenuBarLaunchAgent();
|
|
3386
3368
|
const executable = findMenuBarExecutable();
|
|
3387
3369
|
const cliInvocation = getCurrentCliInvocation();
|
|
3388
3370
|
if (!executable || !cliInvocation) return;
|
|
3389
|
-
const existingPid = getRunningMenuBarPid();
|
|
3390
|
-
if (existingPid) {
|
|
3391
|
-
return;
|
|
3392
|
-
}
|
|
3393
3371
|
killExistingMenuBar();
|
|
3394
3372
|
try {
|
|
3395
3373
|
const { spawn: spawnChild } = await import("child_process");
|