We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14bce7e commit 62588f9Copy full SHA for 62588f9
src/package/utils.ts
@@ -9,7 +9,10 @@ function isModuleDir(current: string, moduleDirs: readonly string[]) {
9
}
10
11
export async function findPackageJson(base: string, moduleDirs: readonly string[]) {
12
- const { root } = path.parse(base);
+ let { root } = path.parse(base);
13
+ if (!root) {
14
+ root = process.cwd();
15
+ }
16
let current = base;
17
18
while (current !== root && !isModuleDir(current, moduleDirs)) {
0 commit comments