Skip to content

Commit 92a8967

Browse files
committed
Minor patch cleanup
1 parent bf9804b commit 92a8967

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/commands/patch/cmd-patch.mts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,17 @@ async function run(
7979
parentName,
8080
})
8181

82-
const dryRun = !!cli.flags['dryRun']
83-
const outputKind = getOutputKind(cli.flags['json'], cli.flags['markdown'])
82+
const { dryRun, json, markdown } = cli.flags as {
83+
dryRun: boolean
84+
json: boolean
85+
markdown: boolean
86+
}
87+
88+
const outputKind = getOutputKind(json, markdown)
8489

8590
const wasValidInput = checkCommandInput(outputKind, {
8691
nook: true,
87-
test: !cli.flags['json'] || !cli.flags['markdown'],
92+
test: !json || !markdown,
8893
message: 'The json and markdown flags cannot be both set, pick one',
8994
fail: 'omit one',
9095
})

0 commit comments

Comments
 (0)