fix(cli): address dsh run review feedback

This commit is contained in:
Tianyi Cui
2026-08-08 15:05:50 +08:00
parent e8ee305b7b
commit bdd2f49df7
7 changed files with 14 additions and 6 deletions

View File

@@ -78,7 +78,7 @@ interface WebOptions {
/** Raw run-subcommand options straight from Commander. */
interface RunOptions {
profile?: string
profile: string
patch?: string[]
}
@@ -161,7 +161,7 @@ Examples:
.argument('<task...>', 'task text')
.action((task: string[], options: RunOptions) => {
rejectParentOptions('run')
const profile = options.profile ?? 'headless'
const profile = options.profile
if (profile === '') program.error('error: --profile needs a name')
const patches = options.patch ?? []
if (patches.includes('')) program.error('error: --patch needs a path')