diff --git a/lib/init-action.js b/lib/init-action.js index ca94a55b5..332835638 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -87169,7 +87169,7 @@ async function getSupportedLanguageMap(codeql) { var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs9.lstatSync(workflowsPath); + const stats = fs9.lstatSync(workflowsPath, { throwIfNoEntry: false }); return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0; } async function getRawLanguagesInRepo(repository, sourceRoot, logger) { diff --git a/src/config-utils.ts b/src/config-utils.ts index 66e50e74d..912941747 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -341,7 +341,7 @@ const baseWorkflowsPath = ".github/workflows"; */ export function hasActionsWorkflows(sourceRoot: string): boolean { const workflowsPath = path.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs.lstatSync(workflowsPath); + const stats = fs.lstatSync(workflowsPath, { throwIfNoEntry: false }); return ( stats !== undefined && stats.isDirectory() &&