Skip to content

Commit

Permalink
Local archives should have priority over remote ones
Browse files Browse the repository at this point in the history
  • Loading branch information
fran6co committed Aug 17, 2022
1 parent 47aefda commit 4d7003f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/vcpkg/binarycaching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,15 @@ ExpectedS<std::vector<std::unique_ptr<IBinaryProvider>>> vcpkg::create_binary_pr

auto& s = sRawHolder.value_or_exit(VCPKG_LINE_INFO);
std::vector<std::unique_ptr<IBinaryProvider>> providers;
if (!s.archives_to_read.empty() || !s.archives_to_write.empty() || !s.url_templates_to_put.empty())
{
providers.push_back(std::make_unique<ArchivesBinaryProvider>(paths,
std::move(s.archives_to_read),
std::move(s.archives_to_write),
std::move(s.url_templates_to_put),
s.secrets));
}

if (!s.gcs_read_prefixes.empty() || !s.gcs_write_prefixes.empty())
{
providers.push_back(std::make_unique<GcsBinaryProvider>(
Expand All @@ -2268,15 +2277,6 @@ ExpectedS<std::vector<std::unique_ptr<IBinaryProvider>>> vcpkg::create_binary_pr
paths, std::move(s.cos_read_prefixes), std::move(s.cos_write_prefixes)));
}

if (!s.archives_to_read.empty() || !s.archives_to_write.empty() || !s.url_templates_to_put.empty())
{
providers.push_back(std::make_unique<ArchivesBinaryProvider>(paths,
std::move(s.archives_to_read),
std::move(s.archives_to_write),
std::move(s.url_templates_to_put),
s.secrets));
}

if (!s.url_templates_to_get.empty())
{
providers.push_back(
Expand Down

0 comments on commit 4d7003f

Please sign in to comment.