Skip to content

Commit be3d841

Browse files
committed
scripts: Fix coverage information downloading script
Fix COVERAGE_DIR parsing from results by using the `-m 1` option in `grep` command to limit the output to a single match. Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
1 parent 78828ae commit be3d841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/download_packit_coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fi
134134
# now we have TF_ARTIFACTS_URL so we can proceed with the download
135135
echo "TF_ARTIFACTS_URL=${TF_ARTIFACTS_URL}"
136136

137-
COVERAGE_DIR=$( curl --retry 5 ${TF_ARTIFACTS_URL}/results.xml | grep -E -o "${TF_ARTIFACTS_URL}.*${TF_COVERAGE_DATA_DIR}" )
137+
COVERAGE_DIR=$( curl --retry 5 ${TF_ARTIFACTS_URL}/results.xml | grep -E -m 1 -o "${TF_ARTIFACTS_URL}.*${TF_COVERAGE_DATA_DIR}" )
138138
echo "COVERAGE_DIR=${COVERAGE_DIR}"
139139

140140
DOWNLOADED="False"

0 commit comments

Comments
 (0)