Skip to content

Commit

Permalink
Merge pull request #12 from skevy/fix-android-cli-validateSdk
Browse files Browse the repository at this point in the history
fixes bug that causes an error to be thrown when ANDROID_HOME is not defined
  • Loading branch information
vjeux committed Aug 28, 2015
2 parents c38a652 + 31fcd73 commit a189ce2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions local-cli/generator-android/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function detectSdk() {
}

function validateSdk(sdkPath) {
if (!sdkPath) {
return null;
}
var android = path.join(sdkPath, 'tools/android');
return fs.existsSync(android) && fs.statSync(android).isFile() ? sdkPath : null;
}
Expand Down

0 comments on commit a189ce2

Please sign in to comment.