From b1088344ffe5d801d31a134000c503f2b35e8c70 Mon Sep 17 00:00:00 2001 From: Voronor <129545215+voronor@users.noreply.github.com> Date: Sat, 23 Nov 2024 12:17:11 +0100 Subject: [PATCH] Fix: Ensure cross-platform compatibility for sed command in CI script --- scripts/checks/coverage.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/checks/coverage.sh b/scripts/checks/coverage.sh index a591069c493..b204335095c 100755 --- a/scripts/checks/coverage.sh +++ b/scripts/checks/coverage.sh @@ -12,7 +12,11 @@ if [ "${CI:-"false"}" == "true" ]; then # Foundry coverage forge coverage --report lcov --ir-minimum # Remove zero hits - sed -i '/,0/d' lcov.info + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' '/,0/d' lcov.info + else + sed -i '/,0/d' lcov.info + fi fi # Reports are then uploaded to Codecov automatically by workflow, and merged.