From fe6532a0524bc0162bf4057ae564839045cc8fb9 Mon Sep 17 00:00:00 2001 From: Carlos Rincon <86779651+carlos-affinidi@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:37:10 +0200 Subject: [PATCH] fix: dont prompt for passphrase if provided via flag (#394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Carlos Rincon <“carlos.r@affinidi.com”> --- src/commands/token/create-token.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/token/create-token.ts b/src/commands/token/create-token.ts index 30531521..9bee325f 100644 --- a/src/commands/token/create-token.ts +++ b/src/commands/token/create-token.ts @@ -165,7 +165,7 @@ export class CreateToken extends BaseCommand { } if (promptFlags['auto-generate-key'] && !promptFlags['no-input']) { - promptFlags.passphrase = validateInputLength( + promptFlags.passphrase ??= validateInputLength( await input({ message: 'Enter a passphrase to encrypt the private key. Leave it empty for no encryption', }),