Skip to content

Commit

Permalink
[fix] Fixes jitsu not reporting new version
Browse files Browse the repository at this point in the history
* Using the jitsu.log before init was making the code throw.
  Since it was in a try catch we never noticed.
  Until now...

![Stare Dad](http://cdn.superbwallpapers.com/wallpapers/meme/staredad-9237-400x250.jpg)
  • Loading branch information
dscape committed Feb 15, 2013
1 parent b1117d2 commit 0ebdc1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lib/jitsu.js
Expand Up @@ -141,16 +141,16 @@ jitsu.start = function (callback) {
return;
}

jitsu.common.checkVersion(function (err) {
jitsu.init(function (err) {
if (err) {
return callback();
jitsu.welcome();
callback(err);
return jitsu.showError(jitsu.argv._.join(' '), err);
}
jitsu.init(function (err) {

jitsu.common.checkVersion(function (err) {
if (err) {
jitsu.welcome();
callback(err);
return jitsu.showError(jitsu.argv._.join(' '), err);
return callback();
}

//
Expand Down
2 changes: 1 addition & 1 deletion lib/jitsu/common/index.js
Expand Up @@ -173,7 +173,7 @@ common.checkVersion = function (callback) {
//
request({
uri: 'http://registry.npmjs.org/jitsu/latest',
timeout: 400
timeout: 1000
}, function (err, res, body) {
if (!responded) {
responded = true;
Expand Down

0 comments on commit 0ebdc1a

Please sign in to comment.