We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abd75e5 commit 09ca1d1Copy full SHA for 09ca1d1
src/lithium/interestingness/outputs.py
@@ -72,11 +72,10 @@ def interesting(
72
run_info = timed_run(args.cmd_with_flags, args.timeout, temp_prefix)
73
74
if temp_prefix is None:
75
- outputs = (run_info.out, run_info.err)
76
- for data in outputs:
77
- if (args.regex and re.match(args.search, data, flags=re.MULTILINE)) or (
78
- args.search.encode("utf-8") in data
79
- ):
+ encoded = args.search.encode("utf-8")
+ match = encoded if args.regex else re.escape(encoded)
+ for data in (run_info.out, run_info.err):
+ if re.search(match, data, flags=re.MULTILINE):
80
LOG.info("[Interesting] Match detected!")
81
return True
82
0 commit comments