Skip to content

Commit

Permalink
Use Yes/No when submitting with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-tengler committed Aug 28, 2022
1 parent c15190a commit 0b557d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arguments/ArgumentBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export abstract class ArgumentBase<TName extends keyof CliArguments> {

if (val === null || (typeof val === "string" && !val)) {
val = chalk.italic("empty") as CliArguments[TName];
} else if (typeof value === "boolean") {
val = (!!value ? "Yes" : "No") as CliArguments[TName];
}

console.log(`${chalk.green("?")} ${this.promptMessage} ${chalk.cyan(val)}`);
Expand Down

0 comments on commit 0b557d1

Please sign in to comment.