Skip to content

Commit 8b9fba4

Browse files
committed
fix(cli): add warning-to-warn coercer for --daemon-log-level
The --log-level option already coerces 'warning' to 'warn' for backward compatibility, but --daemon-log-level was missing the same coercer, causing a yargs validation error for users passing the old value.
1 parent 660a29f commit 8b9fba4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/cli/commands/daemon.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export function registerDaemonCommands(app: Argv, opts: DaemonCommandsOptions):
5353
'info',
5454
'debug',
5555
] as const,
56+
coerce: (value: unknown) => {
57+
if (typeof value !== 'string') return value;
58+
return value.trim().toLowerCase() === 'warning' ? 'warn' : value;
59+
},
5660
})
5761
.option('tail', {
5862
type: 'number',

0 commit comments

Comments
 (0)