diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index df2024b997..a162908135 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -798,11 +798,11 @@ pre_check_tools () { } gcc_version() { - cc="$1" - if command -v clang > /dev/null ; then - "$cc" --version | sed -En '1s/^[^ ]* \([^)]*\) ([0-9]+).*/\1/p' + gcc="$1" + if command -v "$gcc" > /dev/null ; then + "$gcc" --version | sed -En '1s/^[^ ]* \([^)]*\) ([0-9]+).*/\1/p' else - echo 0 # report version 0 for "no clang" + echo 0 # report version 0 for "no gcc" fi }