Skip to content

Commit

Permalink
fix(args): fix usage() show defaults logic
Browse files Browse the repository at this point in the history
- show all default values (incl. zero, false), only skip undefined
  • Loading branch information
postspectacular committed Mar 20, 2021
1 parent af16a3a commit ae31158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/args/src/usage.ts
Expand Up @@ -54,7 +54,7 @@ export const usage = <T extends IObjectOf<any>>(
)
: "";
const defaults =
opts.showDefaults && spec.default
opts.showDefaults && spec.default !== undefined
? ansi(
` (default: ${stringify()(
spec.defaultHint != undefined
Expand Down

0 comments on commit ae31158

Please sign in to comment.