Skip to content

Commit

Permalink
fix(run-tests): check that FAILED is defined
Browse files Browse the repository at this point in the history
before attempting to access its value.
  • Loading branch information
tomeon committed Sep 15, 2023
1 parent 33acd82 commit 3727d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ done
echo -e " ${GREEN}${PASS} ${COUNT_PASS} Passed${RESET}"
echo -e " ${RED}${FAIL} ${COUNT_FAIL} Failed${RESET}"

if (( "${#FAILED[@]}" > 0 )); then
if [[ -v FAILED ]] && (( "${#FAILED[@]}" > 0 )); then
echo -e "\n ${YELLOW}The following files have failing test cases:${RESET}"

for failed in "${!FAILED[@]}"; do
Expand Down

0 comments on commit 3727d11

Please sign in to comment.