move error matcher definition into dedicated file
This commit is contained in:
parent
1f3ce75844
commit
7dbaff09b6
11 changed files with 40 additions and 12 deletions
2
lib/exec_wrapper.js
generated
2
lib/exec_wrapper.js
generated
|
|
@ -64,7 +64,7 @@ async function exec_wrapper(commandLine, args, matchers, options) {
|
|||
return returnState;
|
||||
if (matchers) {
|
||||
for (const [customCode, regex, message] of matchers) {
|
||||
if (customCode === returnState || regex.test(stderr) || regex.test(stdout)) {
|
||||
if (customCode === returnState || regex && (regex.test(stderr) || regex.test(stdout))) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue