From 453f48b67d209f5c2b20040b6902f54fa71d7064 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 16 Jan 2023 15:38:19 +0100 Subject: just-mr: fix quoting ... in error message reporting the lack of present distdirs. --- src/other_tools/just_mr/main.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3