From 18e419db50b906108c4923ee9bf6fc6ab694e372 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 12 Nov 2015 13:40:10 -0800 Subject: [PATCH] ignore duplicate publish errors --- scripts/publish.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index 0990b820db..c541aed249 100755 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -174,8 +174,11 @@ function publish() { child.exec("cd " + loc + " && npm publish --tag prerelease", function (err, stdout, stderr) { if (err || stderr) { - console.error(err || stderr); - return run(done); + err = stderr || err.stack; + console.error(err); + if (err.indexOf("You cannot publish over the previously published version") < 0) { + return run(done); + } } console.log(stdout.trim());