Skip to content

Commit

Permalink
Fix glob usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile-Filteau committed Sep 24, 2024
1 parent 72981b8 commit c21ac89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const validUsers = (core.getInput("api_users") || process.env.API_USERS || '')
.split(",")
.filter((u) => !!u);

const files = globSync([`${path}.{yml,yaml}`]);
const files = globSync([`${path}/*.{yml,yaml}`]);

files
.map((file) => {
try {
const content = yaml.load(fs.readFileSync(`${path}/${file}`, "utf8"));
const content = yaml.load(fs.readFileSync(file, "utf8"));
return [file, content];
} catch (error) {
fail(`Error parsing file ${file} : ${error}`);
Expand Down

0 comments on commit c21ac89

Please sign in to comment.