Skip to content

Commit 4cbb8ff

Browse files
rondefreitasJotaFan
authored andcommitted
Support existing coveragerc file
Add support for users to provide and use an existing .coveragerc file
1 parent 9fe73b1 commit 4cbb8ff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ fi
8787

8888

8989
# write omit str list to coverage file
90-
cat << EOF > "$COV_CONFIG_FILE"
90+
if [ -n "$4" ] && [ -f "./${COV_CONFIG_FILE}" ]; then
91+
>&2 echo "Cannot support both user-provided '$COV_CONFIG_FILE' file along with cov-omit-list configuration."
92+
exit 1
93+
elif [ -n "$4" ]; then
94+
cat << EOF > "$COV_CONFIG_FILE"
9195
[run]
9296
omit = $4
9397
EOF
98+
fi
9499

95100
if [ -f "./pyproject.toml" ] && [ -f "./poetry.lock" ]
96101
then

0 commit comments

Comments
 (0)