mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 06:18:55 +00:00
fix(proxy): avoid undefined status port output
This commit is contained in:
@@ -136,7 +136,7 @@ async function handleStatus(args: string[] = []): Promise<number> {
|
|||||||
const printStatus = (status: Awaited<ReturnType<typeof getOpenAICompatProxyStatus>>) => {
|
const printStatus = (status: Awaited<ReturnType<typeof getOpenAICompatProxyStatus>>) => {
|
||||||
console.log(
|
console.log(
|
||||||
status.running
|
status.running
|
||||||
? ok(`Proxy running on port ${status.port}`)
|
? ok(`Proxy running on port ${status.port ?? 'unknown'}`)
|
||||||
: info(`Proxy is not running${status.port ? ` (last known port ${status.port})` : ''}`)
|
: info(`Proxy is not running${status.port ? ` (last known port ${status.port})` : ''}`)
|
||||||
);
|
);
|
||||||
if (status.host && status.port) {
|
if (status.host && status.port) {
|
||||||
|
|||||||
Reference in New Issue
Block a user