From f4c56016f36445db97d96fa4018041e5c114b72e Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 14 Jul 2026 23:05:32 +0100 Subject: [PATCH] Stat path to check it is a file --- lib/entry-points.js | 2 +- src/config-utils.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 7f11d8a40..33accb587 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -149242,7 +149242,7 @@ async function loadUserConfig(actionState, configFile, workspacePath, apiDetails } else if (isLocal(configFile)) { const localFilePath = path10.resolve(workspacePath, configFile); const workspaceRelative = isWorkspaceRelative(localFilePath); - if (workspaceRelative && fs9.existsSync(localFilePath)) { + if (workspaceRelative && fs9.statSync(localFilePath, { throwIfNoEntry: false })?.isFile()) { configFile = localFilePath; localFile = true; } else { diff --git a/src/config-utils.ts b/src/config-utils.ts index 30a328a66..015d5d24d 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -510,7 +510,10 @@ export async function loadUserConfig( const workspaceRelative = isWorkspaceRelative(localFilePath); // If the path is relative to the workspace and the file exists, then we use it. - if (workspaceRelative && fs.existsSync(localFilePath)) { + if ( + workspaceRelative && + fs.statSync(localFilePath, { throwIfNoEntry: false })?.isFile() + ) { configFile = localFilePath; localFile = true; } else {