From ab375da9bfb22526a86c75706dd97522412abd3b Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 18 Dec 2024 18:06:29 +0900 Subject: [PATCH] Update publish.js --- deploy/publish.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/deploy/publish.js b/deploy/publish.js index 2fc24ea37..c2ca19420 100644 --- a/deploy/publish.js +++ b/deploy/publish.js @@ -32,11 +32,13 @@ const setup = ({ tag, name, directory, version }) => { fs.writeFileSync(file, JSON.stringify(info, null, 2), "utf8"); if (fs.existsSync(`${directory}/package-lock.json`)) fs.rmSync(`${directory}/package-lock.json`); - execute({ - cwd: directory, - script: `npm publish --tag ${tag} --access public${tag === "latest" ? " --provenance" : ""}`, - studio: "inherit", - }); + try { + execute({ + cwd: directory, + script: `npm publish --tag ${tag} --access public${tag === "latest" ? " --provenance" : ""}`, + studio: "inherit", + }); + } catch {} // ROLLBACK THE PACKAGE.JSON for (const r of rollbacks) r();