tools icon indicating copy to clipboard operation
tools copied to clipboard

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

Open mrverdant13 opened this issue 1 year ago • 2 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

@Victowolf this seems to be AI-generated content, which is not helpful to users due to hard to spot inaccuracies. Please refrain from posting this type of content.

mosuem avatar Mar 10 '25 15:03 mosuem

@mosuem Hi.. I am presently a student studying Engineering, I am new to GIT HUB...

And dont know how conversations work out, I thought using A.I to enhance the comments would help out in keeping things more formal and effective...

Sorry for inconvenience, i will make sure i directly comment without enhancing it with A.I

Victowolf avatar Mar 10 '25 15:03 Victowolf