From f01f53bb44e4b52b4d2062c33f974e88aa5e84e8 Mon Sep 17 00:00:00 2001 From: Peter Hale Date: Thu, 9 Feb 2023 11:24:25 -0700 Subject: [PATCH] feat: add default answer param to confirm @W-12521197@ --- src/sfCommand.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sfCommand.ts b/src/sfCommand.ts index fccdaaee..050e891a 100644 --- a/src/sfCommand.ts +++ b/src/sfCommand.ts @@ -333,10 +333,11 @@ export abstract class SfCommand extends Command { * * @param message text to display. Do not include a question mark. * @param ms milliseconds to wait for user input. Defaults to 10s. + * @param defaultAnswer boolean to set the default answer to. Defaults to true. * @return true if the user confirms, false if they do not. */ - public async confirm(message: string, ms = 10000): Promise { - return this.prompter.confirm(message, ms); + public async confirm(message: string, ms = 10000, defaultAnswer = true): Promise { + return this.prompter.confirm(message, ms, defaultAnswer); } /**