【发布时间】:2019-12-24 16:39:28
【问题描述】:
我一直在尝试使用 WSL 为我的 Flutter 项目的代码覆盖率生成 html 报告,但是当我运行 genhtml coverage/lcov.info -o coverage/html 时会发生这种情况:
Reading data file coverage/lcov.info
Resolved relative source file path "lib\blocs\bloc1\bloc1.dart" with CWD to "/mnt/c/Users/User/flutter_project/lib\blocs\bloc1\bloc1.dart".
Found 284 entries.
Found common filename prefix "/mnt/c/Users/User/flutter_project"
Writing .css and .png files.
Generating output.
Processing file flutter_project/lib\otherDir\other_file.dart
genhtml: ERROR: cannot read /mnt/c/Users/User/flutter_project/lib\otherDir\other_file.dart
我可以理解这可能与路径有关,但我不确定如何修复它。有什么建议吗?
【问题讨论】:
-
尝试使用 WSL 中的用户主文件夹 (
~) 而不是 C 盘 (/mnt/c)。
标签: flutter windows-subsystem-for-linux lcov