Commit 7a499b60 authored by Emeric Verschuur's avatar Emeric Verschuur

[ci-toolbox] Fix command check (job list part)

parent d958e647
......@@ -344,8 +344,7 @@ $(for j in "${CITBX_JOB_LIST[@]}"; do echo " $j"; done | sort -u)"
;;
*)
# Command check
pattern='\b'"$command"'\b'
if ! [[ "${CITBX_JOB_LIST[*]}" =~ $pattern ]]; then
if ! printf "%s\n" "${CITBX_JOB_LIST[@]}" | grep -q ^"$command"$; then
print_critical "Unreconized command '$command'; type '$CITBX_TOOL_NAME help' to display the help"
fi
CI_JOB_NAME=$command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment