aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-09-15 18:04:12 -0700
committerGitHub <noreply@github.com>2020-09-15 18:04:12 -0700
commit54a09ff4efd96e268899ef975abb943d8247c0e2 (patch)
tree189bac0464c1cf00dba5cced0b07e0c8cb95bff2 /toolsrc/src
parentf1bef4aa7ca7e2a6ea4f5dfe4850d95fce60b431 (diff)
downloadvcpkg-54a09ff4efd96e268899ef975abb943d8247c0e2.tar.gz
vcpkg-54a09ff4efd96e268899ef975abb943d8247c0e2.zip
[vcpkg-docs] Add docs/users/binarycaching.md (#13517)
* [vcpkg-docs] Add docs/users/binarycaching.md * [vcpkg] Address PR Comments Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/binarycaching.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg/binarycaching.cpp b/toolsrc/src/vcpkg/binarycaching.cpp
index d84081d1a..d8ce321c1 100644
--- a/toolsrc/src/vcpkg/binarycaching.cpp
+++ b/toolsrc/src/vcpkg/binarycaching.cpp
@@ -669,7 +669,8 @@ namespace
if (auto p_str = maybe_cachepath.get())
{
Metrics::g_metrics.lock()->track_property("VCPKG_DEFAULT_BINARY_CACHE", "defined");
- const auto path = fs::u8path(*p_str);
+ auto path = fs::u8path(*p_str);
+ path.make_preferred();
const auto status = fs::stdfs::status(path);
if (!fs::stdfs::exists(status))
return {"Path to VCPKG_DEFAULT_BINARY_CACHE does not exist: " + fs::u8string(path),
@@ -682,9 +683,10 @@ namespace
return {"Value of environment variable VCPKG_DEFAULT_BINARY_CACHE is not absolute: " +
fs::u8string(path),
expected_right_tag};
- return ExpectedS<fs::path>(path);
+ return {std::move(path), expected_left_tag};
}
p /= fs::u8path("vcpkg/archives");
+ p.make_preferred();
if (p.is_absolute())
{
return {std::move(p), expected_left_tag};
@@ -1104,12 +1106,13 @@ void vcpkg::help_topic_binary_caching(const VcpkgPaths&)
const auto& maybe_cachepath = default_cache_path();
if (auto p = maybe_cachepath.get())
{
- auto p_preferred = *p;
System::print2(
"\nBased on your system settings, the default path to store binaries is\n ",
- fs::u8string(p_preferred.make_preferred()),
- "\n\nThis consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.");
+ fs::u8string(*p),
+ "\nThis consults %LOCALAPPDATA%/%APPDATA% on Windows and $XDG_CACHE_HOME or $HOME on other platforms.\n");
}
+ System::print2("\nExtended documentation is available at "
+ "https://github.com/Microsoft/vcpkg/tree/master/docs/users/binarycaching.md \n");
}
std::string vcpkg::generate_nuget_packages_config(const Dependencies::ActionPlan& action)