coverage icon indicating copy to clipboard operation
coverage copied to clipboard

bug: `format_coverage` does now work when invoked with `dart pub global run`

Open mrverdant13 opened this issue 1 year ago • 0 comments

Details

Case 1 - command invoked through dart pub global run

When running the following command:

dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib

The following exception is thrown:

Cannot open file, path = '..\..\..\..\..\..\..\..\..\AppData\Local\Pub\Cache\global_packages\coverage\.dart_tool\package_config.json' (OS Error: The system cannot find the path specified. , errno = 3)

However, if I go to the given path, I can find the referenced package_config.json file.

Case 2 - command directly invoked through the global executable

On the other hand, the expected output (the lcov.info file) is properly generated when using the following command:

format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib

Expected behaviour

The same lcov.info file should be generated in both cases.

More context

OS: Windows 11 Dart SDK version: 3.2.3 coverage version: 1.7.2

mrverdant13 avatar Jan 03 '24 05:01 mrverdant13