From 652fc595e8e5daa635bdd2708ec83d8fdfbb9fec Mon Sep 17 00:00:00 2001 From: Wenqi Mou Date: Tue, 30 Jul 2024 15:30:08 -0400 Subject: [PATCH] use NF instead of 2 --- scripts/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check.sh b/scripts/check.sh index 684f5c1ed..24f057481 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash check_protoc_version() { - version=$(protoc --version | awk '{print $2}') + version=$(protoc --version | awk '{print $NF}') major=$(echo ${version} | cut -d '.' -f 1) minor=$(echo ${version} | cut -d '.' -f 2) if [ "$major" -eq 3 ] && [ "$minor" -ge 8 ]; then