From c8b1d521d80b59f8a393457e958238b70218fd8c Mon Sep 17 00:00:00 2001 From: yiling Date: Sat, 20 Jun 2026 12:59:58 +0800 Subject: [PATCH] fix(cli): open log files in write mode to truncate on startup --- packages/core/src/utils/daemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils/daemon.ts b/packages/core/src/utils/daemon.ts index 98458ca2..134e0f25 100644 --- a/packages/core/src/utils/daemon.ts +++ b/packages/core/src/utils/daemon.ts @@ -111,7 +111,7 @@ function startDaemon(appName: string, pidFile: string, logFile: string): void { } console.log(`Starting ${appName} in background...`) - const logFd = openSync(logFile, 'a') + const logFd = openSync(logFile, 'w') const childArgs = process.argv.slice(1).filter((arg) => arg !== '-d' && arg !== 'restart')