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) {