don't print publish-for-arch warning on failure

This commit is contained in:
David Glasser
2014-08-24 19:01:24 -07:00
parent 08b2625082
commit d30efc2ae8

View File

@@ -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;