Skip to content

Commit

Permalink
Add more logging to check-for-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Oct 13, 2017
1 parent a0e2f11 commit 07d58f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/check-for-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ const request = require('request-promise-native');
const warn = require('../lib/log').warn;

module.exports = (options) => {
const current = require('../../package').version;
info(`Current version: ${current}. Checking NPM for updates…`);

if(!options) options = {};

return request
.get('https://registry.npmjs.org/medic-configurer-beta')
.then(res => {
const json = JSON.parse(res);
const latest = json['dist-tags'].latest;
const current = require('../../package').version;

info(`Current version: ${current}`);
if(latest === current) {
info('You are already on the latest version :¬)');
} else {
Expand Down

0 comments on commit 07d58f1

Please sign in to comment.