Wrap all mode checks with whitespace, along with comparison strings, so only exact string matches are allowed, preventing clashes when output modes are named similarly, e.g. 'json' and 'json-asff'

Fixes #571
This commit is contained in:
Marc Jay
2020-04-26 01:02:39 +01:00
parent 33523885f1
commit f84b843388
3 changed files with 19 additions and 19 deletions

View File

@@ -16,7 +16,7 @@
JUNIT_OUTPUT_DIRECTORY="junit-reports"
is_junit_output_enabled() {
if [[ ${MODES[@]} =~ "junit-xml" ]]; then
if [[ " ${MODES[@]} " =~ " junit-xml " ]]; then
true
else
false