diff --git a/lib/android.js b/lib/android.js index 25c45e3..21306c3 100644 --- a/lib/android.js +++ b/lib/android.js @@ -49,8 +49,9 @@ const dirs = process.platform === 'win32' // need to find the android module and its package.json let androidPackageJson = {}; +const { root } = path.parse(__dirname); (function findPackageJson(dir) { - if (dir !== '/') { + if (dir !== root) { const file = path.join(dir, 'android', 'package.json'); if (fs.existsSync(file)) { androidPackageJson = require(file);