From e560db85f43017e4d83d8a9a9de6b983a4540530 Mon Sep 17 00:00:00 2001 From: musistudio Date: Wed, 30 Jul 2025 15:10:44 +0800 Subject: [PATCH] fix: show default port 3456 in status when not specified in config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the PORT was not specified in the config file, the status command would show "undefined" for the port. This fix ensures that the default port 3456 is displayed instead, matching the actual behavior of the service which uses 3456 as the default port. Fixes the issue where `ccr status` shows undefined for port when not configured explicitly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/utils/processCheck.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/processCheck.ts b/src/utils/processCheck.ts index b5b2113..16d864f 100644 --- a/src/utils/processCheck.ts +++ b/src/utils/processCheck.ts @@ -75,12 +75,13 @@ export async function getServiceInfo() { const pid = getServicePid(); const running = isServiceRunning(); const config = await readConfigFile(); + const port = config.PORT || 3456; return { running, pid, - port: config.PORT, - endpoint: `http://127.0.0.1:${config.PORT}`, + port, + endpoint: `http://127.0.0.1:${port}`, pidFile: PID_FILE, referenceCount: getReferenceCount() };