Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(action): regex for args from package.json #109

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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