aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Funk <65156839+TobiasFunk@users.noreply.github.com>2020-05-11 23:54:47 +0200
committerGitHub <noreply@github.com>2020-05-11 14:54:47 -0700
commit06c647e11a21dd4c193e63968e1d3f9024e05996 (patch)
tree6410e1d6ebc2b18a825b3b6eef24265212c1db71
parent43579f3d7f111810902207aa10251193d3903af2 (diff)
downloadvcpkg-06c647e11a21dd4c193e63968e1d3f9024e05996.tar.gz
vcpkg-06c647e11a21dd4c193e63968e1d3f9024e05996.zip
[vcpkg] Resolve --overlay-ports is only working for relative parths since fix… (#11302)
* Resolve --overlay-ports is only working for relative parths since fix for https://github.com/microsoft/vcpkg/issues/10771 Fixes https://github.com/microsoft/vcpkg/issues/11301 * use auto instead of fs::path
-rw-r--r--toolsrc/src/vcpkg/portfileprovider.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/toolsrc/src/vcpkg/portfileprovider.cpp b/toolsrc/src/vcpkg/portfileprovider.cpp
index 975cd50a8..afb213784 100644
--- a/toolsrc/src/vcpkg/portfileprovider.cpp
+++ b/toolsrc/src/vcpkg/portfileprovider.cpp
@@ -35,7 +35,15 @@ namespace vcpkg::PortFileProvider
{
if (!overlay_path.empty())
{
- auto overlay = fs.canonical(VCPKG_LINE_INFO, paths.original_cwd / fs::u8path(overlay_path));
+ auto overlay = fs::u8path(overlay_path);
+ if (overlay.is_absolute())
+ {
+ overlay = fs.canonical(VCPKG_LINE_INFO, overlay);
+ }
+ else
+ {
+ overlay = fs.canonical(VCPKG_LINE_INFO, paths.original_cwd / overlay);
+ }
Debug::print("Using overlay: ", overlay.u8string(), "\n");