diff --git a/src/authBaseCommand.ts b/src/authBaseCommand.ts index b39e76d1..8ea18bbf 100644 --- a/src/authBaseCommand.ts +++ b/src/authBaseCommand.ts @@ -33,7 +33,7 @@ export abstract class AuthBaseCommand extends SfCommand { } protected async shouldExitCommand(noPrompt?: boolean, message?: string): Promise { - if (noPrompt || Global.getEnvironmentMode() !== Mode.DEMO) { + if (Boolean(noPrompt) || Global.getEnvironmentMode() !== Mode.DEMO) { return false; } else { const msg = dimMessage(message ?? messages.getMessage('warnAuth', [this.config.bin])); @@ -43,7 +43,7 @@ export abstract class AuthBaseCommand extends SfCommand { } protected async shouldRunCommand(noPrompt?: boolean, message?: string, defaultAnswer = true): Promise { - if (noPrompt || Global.getEnvironmentMode() === Mode.DEMO) { + if (Boolean(noPrompt) || Global.getEnvironmentMode() === Mode.DEMO) { return true; } else { const msg = dimMessage(message ?? messages.getMessage('warnAuth', [this.config.bin]));