Replace debug option with printErrors and add comments

This commit is contained in:
Sashko Stubailo
2015-02-05 12:00:17 -08:00
parent 6622ac35e1
commit 4e2671ec7b

View File

@@ -33,7 +33,7 @@ exports.tryToDownloadUpdate = function (options) {
var firstCheck = true;
var checkForUpdate = function (showBanner, debug) {
var checkForUpdate = function (showBanner, printErrors) {
// While we're doing background stuff, try to revoke any old tokens in our
// session file.
auth.tryRevokeOldTokens({timeout: 15*1000});
@@ -58,7 +58,7 @@ var checkForUpdate = function (showBanner, debug) {
if (!release.current.isProperRelease())
return;
updateMeteorToolSymlink(debug);
updateMeteorToolSymlink(printErrors);
maybeShowBanners();
};
@@ -146,7 +146,7 @@ var maybeShowBanners = function () {
// Update ~/.meteor/meteor to point to the tool binary from the tools of the
// latest recommended release on the default release track.
var updateMeteorToolSymlink = function (debug) {
var updateMeteorToolSymlink = function (printErrors) {
// Get the latest release version of METEOR. (*Always* of the default
// track, not of whatever we happen to be running: we always want the tool
// symlink to go to the default track.)
@@ -180,8 +180,10 @@ var updateMeteorToolSymlink = function (debug) {
tropohouse.default.downloadPackagesMissingFromMap(packageMap);
});
if (messages.hasMessages()) {
// Ignore errors, because we are running in the background.
if (debug) {
// Ignore errors because we are running in the background, uness we
// specifically requested to print errors because we are testing this
// feature.
if (printErrors) {
Console.printMessages(messages);
}
return;