From 58c4ed874c2013a1078ca8741bd2a7b9d8d58fec Mon Sep 17 00:00:00 2001 From: Abolfazl Hosseini Date: Thu, 1 May 2025 07:24:59 -0400 Subject: [PATCH 1/2] Improved OTP validation message and prompt handling --- compiler/scripts/release/prompt-for-otp.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/scripts/release/prompt-for-otp.js b/compiler/scripts/release/prompt-for-otp.js index 3cb1e419c784e..f152ce85f9f31 100644 --- a/compiler/scripts/release/prompt-for-otp.js +++ b/compiler/scripts/release/prompt-for-otp.js @@ -11,12 +11,11 @@ const prompt = require('prompt-promise'); const run = async () => { while (true) { const otp = await prompt('NPM 2-factor auth code: '); - prompt.done(); if (otp) { + prompt.done(); return otp; } else { - console.error('\nTwo-factor auth is required to publish.'); - // (Ask again.) + console.error('\nTwo-factor authentication code is required to publish.'); } } }; From 5993fca6f8dce75962bcde419ae28b6a764cd7d2 Mon Sep 17 00:00:00 2001 From: Abolfazl Hosseini Date: Thu, 1 May 2025 07:38:38 -0400 Subject: [PATCH 2/2] Improved OTP validation message and prompt handling --- compiler/scripts/release/prompt-for-otp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/scripts/release/prompt-for-otp.js b/compiler/scripts/release/prompt-for-otp.js index f152ce85f9f31..9797cbb663f58 100644 --- a/compiler/scripts/release/prompt-for-otp.js +++ b/compiler/scripts/release/prompt-for-otp.js @@ -20,4 +20,4 @@ const run = async () => { } }; -module.exports = run; +module.exports = run; \ No newline at end of file