diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-03-23 12:38:05 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-03-23 16:00:15 +0100 |
commit | 680ed52991dfcc0987829f416e02e7eae9239472 (patch) | |
tree | b1a03fe7a3aa7ce28cfac6425c3ce704d76c9e87 /src/buildtool/main/install_cas.cpp | |
parent | ced48241beb02517b16984093082235a25aa6baa (diff) | |
download | justbuild-680ed52991dfcc0987829f416e02e7eae9239472.tar.gz |
just install{,-cas}: offer local CAS as preferred CAS
... to avoid unnecessary downloads and hence speed things up.
Diffstat (limited to 'src/buildtool/main/install_cas.cpp')
-rw-r--r-- | src/buildtool/main/install_cas.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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<IExecutionApi*> const& api, - FetchArguments const& clargs) -> bool { +auto FetchAndInstallArtifacts( + gsl::not_null<IExecutionApi*> const& api, + gsl::not_null<IExecutionApi*> 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<IExecutionApi*> 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; } |