feedback icon indicating copy to clipboard operation
feedback copied to clipboard

[CLI] [Regression] [10.1.0] --dir Directory --file *.xml doesn't find coverage files anymore

Open nikosatwork opened this issue 3 months ago • 2 comments

Also reported in prevent-cli repository: https://github.com/getsentry/prevent-cli/issues/90

Environment

Broken in Versions: 10.1.0, 10.1.1, 11.1.0 Works in Versions: 9.1.0, 9.1.1, 10.0.1 Regressed in version: 10.1.0

Steps to Reproduce

When the coverage files are located in a folder structure likej this:

Directory/opencov/CoverageResults_0000.xml
Directory/opencov/CoverageResults_0001.xml
Directory/opencov/CoverageResults_0002.xml

Executing the uploader like this:

./codecov --enterprise-url https://codecov.self-hosted.com --verbose upload-process --disable-search --disable-file-fixes --plugin none --fail-on-error --git-service github --dir Directory --file *.xml --token xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx --name Tests --flag Tests

Expected Result

To find all files:

-- Found 3 coverage files to report
-- > Directory/opencov/CoverageResults_0000.xml
-- > Directory/opencov/CoverageResults_0001.xml
-- > Directory/opencov/CoverageResults_0002.xml

Actual Result

It doesn't find any coverage files. Returns:

-- Found 0 coverage files to report

Workaround

In version 10.1.0 and above using --dir Directory --file **/*.xml works as expected. Additionally, using just --file Directory/**/*.xml works too.

However, this still represents a regression that requires us to make changes to our system, so a proper fix is preferable.

Advice on best practice

Please also advice what is the best practice for achieving the above result. Note that using just --dir Directory, without specifying --file *.xml doesn't find any coverage files too.

nikosatwork avatar Aug 20 '25 14:08 nikosatwork