Skip to content

Commit f14235c

Browse files
voronorAmxx
authored andcommitted
Ensure cross-platform of coverage.sh (OpenZeppelin#5316)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent 5e7d8a0 commit f14235c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/checks/coverage.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ if [ "${CI:-"false"}" == "true" ]; then
1414
# Foundry coverage
1515
forge coverage --report lcov --ir-minimum
1616
# Remove zero hits
17-
sed -i '/,0/d' lcov.info
17+
if [[ "$OSTYPE" == "darwin"* ]]; then
18+
sed -i '' '/,0/d' lcov.info
19+
else
20+
sed -i '/,0/d' lcov.info
21+
fi
1822
fi
1923

2024
# Reports are then uploaded to Codecov automatically by workflow, and merged.

0 commit comments

Comments
 (0)