Skip to content

Commit

Permalink
corrected doctor error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonahss committed Feb 24, 2014
1 parent c60dfc5 commit 27949f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/doctor/android.js
Expand Up @@ -23,7 +23,7 @@ AndroidChecker.prototype.runAllChecks = function (cb) {
};

AndroidChecker.prototype.checkAndroidHomeExported = function (cb) {
if (env.ANDROID_HOME === null) {
if (typeof env.ANDROID_HOME === "undefined") {
this.log.fail('ANDROID_HOME is not set', cb);
} else if (fs.existsSync(env.ANDROID_HOME)) {
this.log.pass('ANDROID_HOME is set to "' + env.ANDROID_HOME + '"', cb);
Expand All @@ -33,7 +33,7 @@ AndroidChecker.prototype.checkAndroidHomeExported = function (cb) {
};

AndroidChecker.prototype.checkJavaHomeExported = function (cb) {
if (env.JAVA_HOME === null) {
if (typeof env.JAVA_HOME === "undefined") {
this.log.fail('JAVA_HOME is not set', cb);
} else if (fs.existsSync(env.JAVA_HOME)) {
this.log.pass('JAVA_HOME is set to "' + env.JAVA_HOME + '."', cb);
Expand All @@ -55,7 +55,7 @@ AndroidChecker.prototype.checkEmulatorExists = function (cb) {
};

AndroidChecker.prototype.checkAndroidSDKBinaryExists = function (toolName, relativeToolPath, cb) {
if (env.ANDROID_HOME !== null) {
if (typeof env.ANDROID_HOME !== "undefined") {
var adbPath = path.resolve(env.ANDROID_HOME, relativeToolPath);
if (fs.existsSync(adbPath)) {
this.log.pass(toolName + " exists at " + adbPath, cb);
Expand Down
4 changes: 2 additions & 2 deletions lib/doctor/ios.js
Expand Up @@ -181,7 +181,7 @@ IOSChecker.prototype.checkForNodeBinary = function (cb) {
};

IOSChecker.prototype.checkForNodeBinaryInCommonPlaces = function (cb) {
if (env.NODE_BIN !== null && fs.existsSync(env.NODE_BIN)) {
if (typeof env.NODE_BIN !== "undefined" && fs.existsSync(env.NODE_BIN)) {
this.log.pass("Node binary found using NODE_BIN environment variable at " + env.NODE_BIN, cb);
} else if (fs.existsSync('/usr/local/bin/node')) {
this.log.pass("Node binary found at /usr/local/bin/node", cb);
Expand Down Expand Up @@ -237,7 +237,7 @@ IOSChecker.prototype.checkForNodeBinaryUsingAppiumConfigFile = function (cb) {
if (err === null) {
try {
var jsonobj = JSON.parse(data);
if (jsonobj.node_bin !== undefined && fs.existsSync(jsonobj.node_bin)) {
if (typeof jsonobj.node_bin !== "undefined" && fs.existsSync(jsonobj.node_bin)) {
this.log.pass("Node binary found using .appiumconfig at " + jsonobj.node_bin, cb);
} else {
cb(msg, msg);
Expand Down

0 comments on commit 27949f5

Please sign in to comment.