Romanx / Cake.Coverlet

Coverlet extensions for Cake Build
MIT License
40 stars 15 forks source link

Bug: If only output directory defined, the resulting file name contain directory name. #42

Open WebDucer opened 3 years ago

WebDucer commented 3 years ago

I have the following behavior, if I set only the CoverletOutputDirectory without filename. The resulting files are written to the parent directory with combined filename of directory+format.

Example for configuration:

var covSettings = new CoverletSettings {
  CoverletOutputDirectory = Directory("./Output/TestResults"),
  CoverletOutputFormat = CoverletOutputFormat.opencover | CoverletOutputFormat. cobertura,
  CollectCoverage = true
}

I get the following dorectory / file structure:

instead of the expected structure:

As I see in commandl ine, the path is send without ending /, so coverlet treat this as a file.

As described here (https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/MSBuildIntegration.md) coverlet treat the CoverletOutput parameter as directory, if this ends with /, as file in other cases.

Romanx commented 3 years ago

Hi there,

Thaks for the report, i'll look at the fixing this shortly and pushing a new build.