From d30efc2ae8c5b0061715a73bb14c5ea0eacee028 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Sun, 24 Aug 2014 19:01:24 -0700 Subject: [PATCH] don't print publish-for-arch warning on failure --- tools/commands-packages.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/commands-packages.js b/tools/commands-packages.js index d5c49ab030..32ee82a93c 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -275,6 +275,15 @@ main.registerCommand({ return ec || 1; } + // We are only publishing one package, so we should close the connection, and + // then exit with the previous error code. + conn.close(); + + // If the publishPackage failed, exit now (no need to spend time trying to + // refresh). + if (ec) + return ec; + // Warn the user if their package is not good for all architectures. var allArchs = compileResult.unipackage.buildArchitectures().split('+'); if (_.any(allArchs, function (arch) { @@ -286,10 +295,7 @@ main.registerCommand({ "Please use publish-for-arch to publish new builds of the package.\n\n"); } - // We are only publishing one package, so we should close the connection, and - // then exit with the previous error code. - conn.close(); - + // Refresh, so that we actually learn about the thing we just published. refreshOfficialCatalogOrDie(); return ec;