Make offline message only appear when we are actually offline

This commit is contained in:
Sashko Stubailo
2014-10-21 23:04:07 -07:00
parent da1b34c449
commit 5257732e47

View File

@@ -74,8 +74,10 @@ var refreshOfficialCatalogOrDie = function (options) {
};
var explainIfRefreshFailed = function () {
Console.info("Your package catalog may be out of date.\n" +
"Please connect to the internet and try again.");
if (catalog.official.offline || catalog.refreshFailed) {
Console.info("Your package catalog may be out of date.\n" +
"Please connect to the internet and try again.");
}
};
// XXX: To formatters.js ?