We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf9804b commit 92a8967Copy full SHA for 92a8967
1 file changed
src/commands/patch/cmd-patch.mts
@@ -79,12 +79,17 @@ async function run(
79
parentName,
80
})
81
82
- const dryRun = !!cli.flags['dryRun']
83
- const outputKind = getOutputKind(cli.flags['json'], cli.flags['markdown'])
+ const { dryRun, json, markdown } = cli.flags as {
+ dryRun: boolean
84
+ json: boolean
85
+ markdown: boolean
86
+ }
87
+
88
+ const outputKind = getOutputKind(json, markdown)
89
90
const wasValidInput = checkCommandInput(outputKind, {
91
nook: true,
- test: !cli.flags['json'] || !cli.flags['markdown'],
92
+ test: !json || !markdown,
93
message: 'The json and markdown flags cannot be both set, pick one',
94
fail: 'omit one',
95
0 commit comments