summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/main.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-01-16 15:38:19 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-01-16 15:48:18 +0100
commit453f48b67d209f5c2b20040b6902f54fa71d7064 (patch)
treee3c2fb9231876264c33511e8e64359357dffa1fc /src/other_tools/just_mr/main.cpp
parentf416b73d9ea81cd1d53818858da296d3b4a07e84 (diff)
downloadjustbuild-453f48b67d209f5c2b20040b6902f54fa71d7064.tar.gz
just-mr: fix quoting
... in error message reporting the lack of present distdirs.
Diffstat (limited to 'src/other_tools/just_mr/main.cpp')
-rw-r--r--src/other_tools/just_mr/main.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp
index 374b160b..3ecfe46d 100644
--- a/src/other_tools/just_mr/main.cpp
+++ b/src/other_tools/just_mr/main.cpp
@@ -503,19 +503,11 @@ void DefaultReachableRepositories(
}
}
if (not fetch_dir) {
- std::string s{};
- for (auto const& d : arguments.common.just_mr_paths->distdirs) {
- s += "\'";
- s += d.string();
- s += "\', ";
- }
- if (not s.empty()) {
- s.erase(s.end() - 1); // remove trailing ' '
- s.erase(s.end() - 1); // remove trailing ','
- }
+ auto considered =
+ nlohmann::json(arguments.common.just_mr_paths->distdirs);
Logger::Log(LogLevel::Error,
- "No directory found to fetch to, considered [{}]",
- s);
+ "No directory found to fetch to, considered {}",
+ considered.dump());
return kExitFetchError;
}