Skip to content

Commit

Permalink
fix: 确定根目录时进入死循环
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Nov 6, 2024
1 parent 876423d commit 25d1e29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export function resolveRootDir() {
if (configFiles.some((file) => fs.existsSync(path.join(dir, file)))) {
return dir;
}
} while (dir);
dir = path.dirname(dir);
} while (path.parse(dir).base);
throw new Error(
"Unable to determine the project root directory, please add the package.json file to the project root directory"
);
Expand Down

0 comments on commit 25d1e29

Please sign in to comment.