Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Commit c017faf

Browse files
committed
fix: Absoulte path for generator
1 parent 97ddaf5 commit c017faf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/run/run.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ int run(int argc, const char* argv[]) {
4040
auto splitted = util::split(sv, ", ");
4141
checkerSources = std::vector<fs::path>{};
4242
for (auto&& path : splitted) {
43-
if (fs::exists(path)) {
44-
checkerSources->emplace_back(path);
43+
fs::path p{path};
44+
if (!p.is_absolute()) {
45+
p = fs::absolute(path);
46+
}
47+
if (fs::exists(p)) {
48+
checkerSources->emplace_back(p);
4549
}
4650
}
4751
});

0 commit comments

Comments
 (0)