From 1fe361cbb5809127fef6ff8d5e958e9a63185c3f Mon Sep 17 00:00:00 2001 From: Io Klarstrup Date: Thu, 29 Aug 2024 10:29:45 +0200 Subject: [PATCH] feat(publish): Reuse OTP --- publish-npm.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish-npm.mjs b/publish-npm.mjs index 5d55599b..f4406708 100644 --- a/publish-npm.mjs +++ b/publish-npm.mjs @@ -442,6 +442,7 @@ async function publish() { ); const cwd = process.cwd(); const publishLog = ['# Packages']; + let otpCode; for (const [packageJsonPath, version] of targetVersions) { process.chdir(packageJsonPath.replace('/package.json', '')); @@ -453,7 +454,6 @@ async function publish() { ]); const pubInd = ora(`Publishing ${name}@${tag} ${nextVersion}`).start(); if (!DRY_RUN) { - let otpCode; async function publish() { try { await run('npm', [