From 02055c5a4886dd1567bb7e06b3336b9e1a58f5db Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Dec 2025 11:45:56 +0100 Subject: [PATCH] addPath(): Restore catching InvalidPathError --- src/libexpr/primops.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index f972a65bd..759b33ac6 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -2815,7 +2815,10 @@ static void addPath( auto rewrites = state.realiseContext(context); path = {path.accessor, CanonPath(rewriteStrings(path.path.abs(), rewrites))}; auto [storePath, subPath] = state.store->toStorePath(path.path.abs()); - refs = state.store->queryPathInfo(storePath)->references; + try { + refs = state.store->queryPathInfo(storePath)->references; + } catch (Error &) { // FIXME: should be InvalidPathError + } } std::unique_ptr filter;