cli: fix benchmark commit interrogation
authorEdward Thomson <[email protected]>
Sun, 2 Mar 2025 08:56:38 +0000 (2 08:56 +0000)
committerEdward Thomson <[email protected]>
Sun, 2 Mar 2025 08:56:38 +0000 (2 08:56 +0000)
Don't fail the benchmark script if we can't identify the CLI commit.

tests/benchmarks/benchmark.sh

index e82eaab..4717591 100755 (executable)
@@ -126,7 +126,7 @@ cli_commit() {
                BUILD_OPTIONS=$("$1" version --build-options)
        fi
 
-       echo "${BUILD_OPTIONS}" | grep '^built from commit: ' | sed -e 's/^built from commit: //'
+       echo "${BUILD_OPTIONS}" | { grep '^built from commit: ' || echo "unknown"; } | sed -e 's/^built from commit: //'
 }
 
 TEST_CLI_NAME=$(basename "${TEST_CLI}")