From d984cf01510785a8eff3a37d6b433143c0e6b5e3 Mon Sep 17 00:00:00 2001 From: Chris Raynor Date: Sun, 26 Oct 2014 14:37:25 -0700 Subject: [PATCH] fixing wrong error message when incorrect password entered --- lib/auth.js | 16 ++++++++++------ package.json | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/auth.js b/lib/auth.js index fd1211a467f..08df8c83e5a 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -148,12 +148,16 @@ var auth = { this.token = token; this.saveConfig(callback); } else if (typeof(response.error) !== 'undefined') { - console.log(chalk.red(response.error.message) + ' - Please update to at ' + - 'least v' + response.minCLI + ' by running ' + - chalk.cyan('npm update -g ' + require('./firebase').name)); - process.exit(1); - } else if (typeof(callback) === 'function') { - setTimeout(callback, 0, new Error('Email or Password Invalid')); + if (typeof(response.minCLI) === 'undefined') { + if (typeof(callback) === 'function') { + setTimeout(callback, 0, new Error('Email or Password Invalid')); + } + } else { + console.log(chalk.red(response.error.message) + ' - Please update to at ' + + 'least v' + response.minCLI + ' by running ' + + chalk.cyan('npm update -g ' + require('./firebase').name)); + process.exit(1); + } } }, saveConfig: function(callback) { diff --git a/package.json b/package.json index 23b47376a45..5af1a8b142c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "firebase-tools", "preferGlobal": true, - "version": "1.1.3", + "version": "1.1.4", "description": "The Firebase Command Line Tools", "keywords": [ "firebase",