Skip to content

Commit

Permalink
fix: prevent looking for a package.json file infinitely
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarner committed Mar 15, 2024
1 parent f6de6c7 commit 7389cd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const getConfigWithDir = () => {
if (config) return { config, dir };
}

dir = path.join(dir, '..');
const parentDir = path.resolve(dir, '..');
if (parentDir === dir) break;
dir = parentDir;
}

console.log(
Expand Down

0 comments on commit 7389cd6

Please sign in to comment.