Skip to content

Commit fb140fa

Browse files
Javier MatosJavier Matos
authored andcommitted
fix test
1 parent 1d44ff4 commit fb140fa

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

azure-pipelines/end-to-end-tests-dir/asset-caching.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ $actual = Run-VcpkgAndCaptureOutput -TestArgs ($commonArgs + @("install", "vcpkg
5555
$actual = $actual -replace "`r`n", "`n"
5656

5757
$expected = @(
58-
"A suitable version of .* was not found \(required v[0-9\.]+\)."
5958
"Asset cache miss; downloading from .*"
6059
"Successfully stored .* to .*."
6160
) -join "`n"

include/vcpkg/base/message-data.inc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ DECLARE_MESSAGE(ArtifactsSwitchX86, (), "", "Forces host detection to x86 when a
248248
DECLARE_MESSAGE(ArtifactsSwitchWindows, (), "", "Forces host detection to Windows when acquiring artifacts")
249249
DECLARE_MESSAGE(AssetCacheHit, (msg::path, msg::url), "", "Asset cache hit for {path}; downloaded from: {url}")
250250
DECLARE_MESSAGE(AssetCacheMiss, (msg::url), "", "Asset cache miss; downloading from {url}")
251+
DECLARE_MESSAGE(AssetCacheMissBlockOrigin,
252+
(msg::path),
253+
"x-block-origin is a vcpkg term. Do not translate",
254+
"Asset cache miss for {path} and downloads are blocked by x-block-origin.")
251255
DECLARE_MESSAGE(DownloadingUrl, (msg::url), "", "Downloading {url}")
252256
DECLARE_MESSAGE(AssetCacheProviderAcceptsNoArguments,
253257
(msg::value),

locales/messages.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@
175175
"_AssetCacheHit.comment": "An example of {path} is /foo/bar. An example of {url} is https://github.com/microsoft/vcpkg.",
176176
"AssetCacheMiss": "Asset cache miss; downloading from {url}",
177177
"_AssetCacheMiss.comment": "An example of {url} is https://github.com/microsoft/vcpkg.",
178+
"AssetCacheMissBlockOrigin": "Asset cache miss for {path} and downloads are blocked by x-block-origin.",
179+
"_AssetCacheMissBlockOrigin.comment": "x-block-origin is a vcpkg term. Do not translate An example of {path} is /foo/bar.",
178180
"AssetCacheProviderAcceptsNoArguments": "unexpected arguments: '{value}' does not accept arguments",
179181
"_AssetCacheProviderAcceptsNoArguments.comment": "{value} is a asset caching provider name such as azurl, clear, or x-block-origin",
180182
"AssetCacheSuccesfullyStored": "Successfully stored {path} to {url}.",

src/vcpkg/base/downloads.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,11 @@ namespace vcpkg
936936
msg::url = replace_secrets(read_url, m_config.m_secrets));
937937
return read_url;
938938
}
939+
else
940+
{
941+
msg::println(msgAssetCacheMissBlockOrigin,
942+
msg::path = download_path.filename());
943+
}
939944
}
940945
else if (auto script = m_config.m_script.get())
941946
{

0 commit comments

Comments
 (0)