From 680ed52991dfcc0987829f416e02e7eae9239472 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 23 Mar 2023 12:38:05 +0100 Subject: just install{,-cas}: offer local CAS as preferred CAS ... to avoid unnecessary downloads and hence speed things up. --- src/buildtool/main/install_cas.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/buildtool/main/install_cas.cpp') diff --git a/src/buildtool/main/install_cas.cpp b/src/buildtool/main/install_cas.cpp index 03c57d71..b56a1069 100644 --- a/src/buildtool/main/install_cas.cpp +++ b/src/buildtool/main/install_cas.cpp @@ -61,8 +61,10 @@ namespace { } #ifndef BOOTSTRAP_BUILD_TOOL -auto FetchAndInstallArtifacts(gsl::not_null const& api, - FetchArguments const& clargs) -> bool { +auto FetchAndInstallArtifacts( + gsl::not_null const& api, + gsl::not_null const& alternative_api, + FetchArguments const& clargs) -> bool { auto object_info = ObjectInfoFromLiberalString(clargs.object_id); if (clargs.output_path) { @@ -72,7 +74,8 @@ auto FetchAndInstallArtifacts(gsl::not_null const& api, } if (not FileSystemManager::CreateDirectory(output_path.parent_path()) or - not api->RetrieveToPaths({object_info}, {output_path})) { + not api->RetrieveToPaths( + {object_info}, {output_path}, alternative_api)) { Logger::Log(LogLevel::Error, "failed to retrieve artifact."); return false; } -- cgit v1.2.3