Skip to content

Commit bef160c

Browse files
waliscXhmikosR
authored andcommitted
reconstructing path appropriately
1 parent bb9551e commit bef160c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function getDirectory(localConfig) {
203203
const packageSubPathPath = nodeModuleParts.pop().split(path.sep).filter(Boolean);
204204
const packageName = packageSubPathPath[0].startsWith('@') ? `${packageSubPathPath[0]}${path.sep}${packageSubPathPath[1]}` : packageSubPathPath[0];
205205

206-
return path.join(...nodeModuleParts, 'node_modules', packageName);
206+
return path.normalize([...nodeModuleParts, `${path.sep}${packageName}`].join('node_modules'));
207207
} catch {
208208
debug(`Could not determine the root directory of package file ${filename}. Using default`);
209209
return null;

0 commit comments

Comments
 (0)