From 40fba5f95cab30eed9caa2751bad52bdf927c193 Mon Sep 17 00:00:00 2001 From: Jonathan Soma Date: Mon, 20 Apr 2020 14:31:29 -0400 Subject: [PATCH] don't fail on republish - probably a bad idea but what the heck --- index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 2cfc180b..691811dc 100644 --- a/index.js +++ b/index.js @@ -112,11 +112,16 @@ const runAction = () => { run(`npm run ${buildScriptName} --if-present`, pkgRoot); } - log(`Building${release ? " and releasing" : ""} the Electron app…`); - run( - `npx electron-forge publish`, - appRoot, - ); + try { + log(`Building${release ? " and releasing" : ""} the Electron app…`); + run( + `npx electron-forge publish`, + appRoot, + ); + } catch(err) { + log(`Failed with an error, probably the "it already exists" one`) + log(err.message) + } }; runAction();