Skip to content

Commit 48f32a2

Browse files
Asok Shanmugamclaude
andcommitted
fix(runCognium): strip Maven download noise from benchmark_version
getBenchmarkVersion.sh runs mvn and pipes through grep -v '[INFO]', but Maven's transfer progress lines ("Downloading from central: ...", "Downloaded from central: ...") have no [INFO] prefix so they bypass the filter. On a cold Maven cache these lines get captured into benchmark_version, producing an invalid filename like: results/Benchmark_Downloading from central: https://...1.2-cognium-v1.6.9.sarif The fix adds 2>/dev/null to silence stderr and pipes through grep -E '^[0-9]+\.[0-9]' to accept only lines that start with digits — the actual version string (e.g. 1.2). All Maven noise is discarded. The second run worked because the local Maven cache was warm so no download lines were emitted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 428a0f5 commit 48f32a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/runCognium.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source scripts/requireCommand.sh
77

88
requireCommand cognium
99

10-
benchmark_version=$(scripts/getBenchmarkVersion.sh)
10+
benchmark_version=$(scripts/getBenchmarkVersion.sh 2>/dev/null | grep -E '^[0-9]+\.[0-9]')
1111
cognium_version=$(cognium --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
1212
result_file="results/Benchmark_$benchmark_version-cognium-v$cognium_version.sarif"
1313

0 commit comments

Comments
 (0)