Skip to content

Commit 0b557d1

Browse files
Use Yes/No when submitting with default value
1 parent c15190a commit 0b557d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/arguments/ArgumentBase.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export abstract class ArgumentBase<TName extends keyof CliArguments> {
4444

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

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

0 commit comments

Comments
 (0)