Skip to content

Commit

Permalink
Error in regular expression project* bin.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rebustron authored Nov 3, 2024
1 parent ae9a4bc commit b42d559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boxes/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ program
// this is some bad code, but it's def fun
// I'm matching all keys started with project and
// then using using modulo to say "if one is defined, two must be defined"
const optsKeys = Object.keys(options).filter((e) => /project*/g.test(e));
const optsKeys = Object.keys(options).filter((e) => /project.*/g.test(e));
if (optsKeys.length % 2) {
throw Error("You must define both the project type and the project name");
}
Expand Down

0 comments on commit b42d559

Please sign in to comment.