diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-03 11:32:41 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-14 13:35:01 +0100 |
commit | e1cb494e522d352f8d06d4f210a4d1dfbf3a890c (patch) | |
tree | 677cf3f35943f6241ca2e26d1b80a77989b60f58 /src/other_tools/just_mr/main.cpp | |
parent | 180abedbc498bd8b5efc19ad068bc0a5704559b2 (diff) | |
download | justbuild-e1cb494e522d352f8d06d4f210a4d1dfbf3a890c.tar.gz |
just-mr: Parse mirrors specification from checkout locations file
Diffstat (limited to 'src/other_tools/just_mr/main.cpp')
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index 1e8905d6..47ec2633 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -676,7 +676,7 @@ auto main(int argc, char* argv[]) -> int { kDefaultDistdirs); } - // read checkout locations + // read checkout locations and alternative mirrors if (arguments.common.checkout_locations_file) { try { std::ifstream ifs(*arguments.common.checkout_locations_file); @@ -685,6 +685,12 @@ auto main(int argc, char* argv[]) -> int { checkout_locations_json .value("checkouts", nlohmann::json::object()) .value("git", nlohmann::json::object()); + arguments.common.alternative_mirrors->local_mirrors = + checkout_locations_json.value("local mirrors", + nlohmann::json::object()); + arguments.common.alternative_mirrors->preferred_hostnames = + checkout_locations_json.value("preferred hostnames", + nlohmann::json::array()); } catch (std::exception const& e) { Logger::Log( LogLevel::Error, |