From e4a42f536d3c356453b545a2ea373fb68a20fe1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Fri, 12 Jul 2024 14:00:29 +0100 Subject: [PATCH] Fix copypasta in gcc_version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- tests/scripts/all-helpers.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scripts/all-helpers.sh b/tests/scripts/all-helpers.sh index 06a9247324..d7af599515 100644 --- a/tests/scripts/all-helpers.sh +++ b/tests/scripts/all-helpers.sh @@ -267,11 +267,11 @@ clang_version() { } 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 }