Skip to content

Commit 1c0e24d

Browse files
author
Vladimir Kotal
committed
match error strings in command output more precisely
fixes #2845
1 parent 0715f9b commit 1c0e24d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opengrok-tools/src/main/python/opengrok_tools/utils/commandsequence.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
SUCCESS_EXITVAL
3131
)
3232
import json
33+
import re
3334

3435

3536
class CommandSequenceBase:
@@ -228,8 +229,9 @@ def check(self, ignore_errors):
228229
self.logger.error(out)
229230
self.logger.error("")
230231

232+
re_program = re.compile('ERROR[:]*\\s+')
231233
errored_cmds = {k: v for k, v in self.outputs.items()
232-
if "error" in str(v).lower()}
234+
if re_program.match(str(v))}
233235
if len(errored_cmds) > 0:
234236
ret = 1
235237
self.logger.error("Command output in project '{}'"

0 commit comments

Comments
 (0)