Commit current desktop and CLI diff

This commit is contained in:
Mohamed Boudra
2026-04-09 18:55:19 +07:00
parent 4068554532
commit 2a5ac7a013
7 changed files with 126 additions and 244 deletions
+7 -11
View File
@@ -1,9 +1,9 @@
import { spawn, type ChildProcess } from "node:child_process";
import { type ChildProcess } from "node:child_process";
import { readFileSync } from "node:fs";
import path from "node:path";
import { app, ipcMain } from "electron";
import log from "electron-log/main";
import { resolvePaseoHome } from "@getpaseo/server";
import { resolvePaseoHome, spawnProcess } from "@getpaseo/server";
import {
copyAttachmentFileToManagedStorage,
deleteManagedAttachmentFile,
@@ -266,15 +266,11 @@ async function startDaemon(): Promise<DesktopDaemonStatus> {
args: invocation.args,
});
const child: ChildProcess = spawn(
invocation.command,
invocation.args,
{
detached: true,
env: { ...invocation.env, PASEO_DESKTOP_MANAGED: "1" },
stdio: ["ignore", "ignore", "ignore"],
},
);
const child: ChildProcess = spawnProcess(invocation.command, invocation.args, {
detached: true,
env: { ...invocation.env, PASEO_DESKTOP_MANAGED: "1" },
stdio: ["ignore", "ignore", "ignore"],
});
logDesktopDaemonLifecycle("detached spawn returned", {
childPid: child.pid ?? null,