Skip to content

Commit

Permalink
fix(action): regex for args from package.json (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlienard authored Dec 10, 2024
1 parent 67f2bb1 commit 3b0baab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32689,7 +32689,7 @@ function getArgsFromPackageJson() {
const packageJson = JSON.parse(packageJsonFile.toString());
// Extract args from the `sherif` script in package.json, starting after
// `sherif ` and ending before the next `&&` or end of line
const regexResult = /sherif\s([a-zA-Z\s\.-]*)(?=\s&&|$)/g.exec(packageJson.scripts.sherif);
const regexResult = /sherif\s([^&&]*)/g.exec(packageJson.scripts.sherif);
if (regexResult && regexResult.length > 1) {
const args = regexResult[1];
core.info(`Using the arguments "${args}" from the root package.json`);
Expand Down
2 changes: 1 addition & 1 deletion action/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async function getArgsFromPackageJson() {

// Extract args from the `sherif` script in package.json, starting after
// `sherif ` and ending before the next `&&` or end of line
const regexResult = /sherif\s([a-zA-Z\s\.-]*)(?=\s&&|$)/g.exec(
const regexResult = /sherif\s([^&&]*)/g.exec(
packageJson.scripts.sherif
);
if (regexResult && regexResult.length > 1) {
Expand Down

0 comments on commit 3b0baab

Please sign in to comment.