Skip to content

Commit f4c5601

Browse files
committed
Stat path to check it is a file
1 parent e7b365e commit f4c5601

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/entry-points.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config-utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ export async function loadUserConfig(
510510
const workspaceRelative = isWorkspaceRelative(localFilePath);
511511

512512
// If the path is relative to the workspace and the file exists, then we use it.
513-
if (workspaceRelative && fs.existsSync(localFilePath)) {
513+
if (
514+
workspaceRelative &&
515+
fs.statSync(localFilePath, { throwIfNoEntry: false })?.isFile()
516+
) {
514517
configFile = localFilePath;
515518
localFile = true;
516519
} else {

0 commit comments

Comments
 (0)