[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
This commit is contained in:
Tobias Funk 2020-05-11 23:54:47 +02:00 committed by GitHub
parent 43579f3d7f
commit 06c647e11a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");