Skip to content

Commit e045f5e

Browse files
committed
Fix hasActionsWorkflows throwing if workflows folder doesn't exist
1 parent ab82675 commit e045f5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/init-action.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const baseWorkflowsPath = ".github/workflows";
341341
*/
342342
export function hasActionsWorkflows(sourceRoot: string): boolean {
343343
const workflowsPath = path.resolve(sourceRoot, baseWorkflowsPath);
344-
const stats = fs.lstatSync(workflowsPath);
344+
const stats = fs.lstatSync(workflowsPath, { throwIfNoEntry: false });
345345
return (
346346
stats !== undefined &&
347347
stats.isDirectory() &&

0 commit comments

Comments
 (0)