Skip to content

Commit

Permalink
keep fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 18, 2024
1 parent 301e439 commit b67842b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/usage.ts
Expand Up @@ -63,10 +63,10 @@ export async function renderUsage<T extends ArgsDef = ArgsDef>(
(arg.type === "enum" && arg.options
? `=<${arg.options.join("|")}>`
: "");
let description = arg.description;
if (arg.type === "boolean" && arg.default === true) {
description = arg.negativeDescription;
}
const isNegative = arg.type === "boolean" && arg.default === true;
const description = isNegative
? arg.negativeDescription || arg.description
: arg.description;
argLines.push([
"`" + argStr + (isRequired ? " (required)" : "") + "`",
description || "",
Expand Down

0 comments on commit b67842b

Please sign in to comment.