Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flags/duration.ts
Original file line number Diff line number Diff line change
@@ -48,6 +48,11 @@ export const durationFlag = Flags.custom<Duration, DurationFlagConfig>({
typeof context.options.defaultValue === 'number'
? toDuration(context.options.defaultValue, context.options.unit)
: undefined,
// eslint-disable-next-line @typescript-eslint/require-await
defaultHelp: async (context) =>
typeof context.options.defaultValue === 'number'
? toDuration(context.options.defaultValue, context.options.unit).toString()
: undefined,
});

const validate = (input: string, config: DurationFlagConfig): Duration => {

0 comments on commit 85a502a

Please sign in to comment.