From 43ef2d24c8b3faacccf03f261e3bd5f6c4b9b47b Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Wed, 16 Sep 2020 18:40:04 +0200 Subject: [PATCH] Don't log in upload method --- src/index.js | 5 ++++- src/upload.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index b4f2548a..08aead1c 100644 --- a/src/index.js +++ b/src/index.js @@ -147,7 +147,10 @@ async function publishBundle(bundle, handlers, outputDir, isLocal, apiToken) { const manifestFile = path.join(outputDir, MANIFEST_FILE); await fsPromises.writeFile(manifestFile, JSON.stringify(bundleInfo, null, 2)); } else { - await uploadBundle(buf, bundleInfo, process.env.DEPLOY_ID, apiToken); + const uploaded = await uploadBundle(buf, bundleInfo, process.env.DEPLOY_ID, apiToken); + if (!uploaded) { + console.log("Bundle already exists. Skipping upload..."); + } } } diff --git a/src/upload.js b/src/upload.js index cefef6fd..facb7f25 100644 --- a/src/upload.js +++ b/src/upload.js @@ -38,7 +38,6 @@ async function uploadBundle(buf, info, deployId, apiToken) { throw new Error(`Failed to upload: ${error}`); } if (exists) { - console.log("Bundle already exists. Skipping upload..."); return false; } if (!upload_url) {