Skip to content

Commit 0b998d3

Browse files
authored
fix(android): Stop infinite recursion on Windows
1 parent ecf9c47 commit 0b998d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ const dirs = process.platform === 'win32'
4949

5050
// need to find the android module and its package.json
5151
let androidPackageJson = {};
52+
const { root } = path.parse(__dirname);
5253
(function findPackageJson(dir) {
53-
if (dir !== '/') {
54+
if (dir !== root) {
5455
const file = path.join(dir, 'android', 'package.json');
5556
if (fs.existsSync(file)) {
5657
androidPackageJson = require(file);

0 commit comments

Comments
 (0)