From 2ca3cf725ab8ffcab3f58aae9675a3d64351fb7f Mon Sep 17 00:00:00 2001 From: bugale Date: Sun, 2 Aug 2026 19:59:09 +0300 Subject: [PATCH] Don't replace registry errors with ` does not exist` (fixes #2094) `VersionedPortfileProviderImpl::entry` discarded the error returned by `get_port_entry` and substituted `msgPortDoesNotExist`, so registry failures (network, git, filesystem) were reported as the port not existing. The genuinely-missing-port case is a *value* holding a null pointer, and is already handled by `load_control_file`; this `else` branch is only reached when there is a real error. Cache the `ExpectedL` as-is so it survives. --- src/vcpkg/portfileprovider.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/vcpkg/portfileprovider.cpp b/src/vcpkg/portfileprovider.cpp index c3eabdd46e..af09ffcfbc 100644 --- a/src/vcpkg/portfileprovider.cpp +++ b/src/vcpkg/portfileprovider.cpp @@ -436,17 +436,7 @@ namespace vcpkg { if (auto reg = m_registry_set.registry_for_port(name)) { - if (auto entry = reg->get_port_entry(name)) - { - entry_it = m_entry_cache.emplace(name.to_string(), std::move(entry)).first; - } - else - { - entry_it = m_entry_cache - .emplace(name.to_string(), - msg::format(msgPortDoesNotExist, msg::package_name = name)) - .first; - } + entry_it = m_entry_cache.emplace(name.to_string(), reg->get_port_entry(name)).first; } else {