always print update summary

This commit is contained in:
silverwind 2017-12-03 16:30:59 +01:00
parent 349d6dcc1e
commit 3e00998dc8
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -57,15 +57,20 @@ Promise.all(deps.map(dep => got(`${url}${dep.name}`))).then(function(responses)
return result.range !== result.newRange;
});
// print results
if (!results.length) {
print("All packages are up to date.");
process.exit(0);
} else if (!cli.flags.u && !cli.flags.update) {
} else {
if (cli.flags.j || cli.flags.json) {
print(results);
} else {
print(formatResults(results));
}
}
// exit if -u is not given
if (!cli.flags.u && !cli.flags.update) {
process.exit(0);
}
return results;