From d2eeabf3e68f65493a8bfeb2ba762c37fcf60e15 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Jun 2024 16:17:24 +0200 Subject: [PATCH 1/2] PackageInfo::queryDrvPath(): Don't dereference an empty optional Fixes a regression introduced in f923ed6b6a7318e8fc77e8d3aeda6796671f67cb. https://hydra.nixos.org/build/262267313 --- src/libexpr/get-drvs.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index ed16a51a1..0d2aecc58 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -82,8 +82,7 @@ std::optional PackageInfo::queryDrvPath() const } else drvPath = {std::nullopt}; } - drvPath.value_or(std::nullopt); - return *drvPath; + return drvPath.value_or(std::nullopt); } From 3e72ed9743a74f210e9dd493c914a2190345751f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Jun 2024 16:19:01 +0200 Subject: [PATCH 2/2] Typo --- src/libexpr/print.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index 920490cfa..10fe7923f 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -278,7 +278,7 @@ private: storePath = state.coerceToStorePath(i->pos, *i->value, context, "while evaluating the drvPath of a derivation"); } - /* This unforutately breaks printing nested values because of + /* This unfortunately breaks printing nested values because of how the pretty printer is used (when pretting printing and warning to same terminal / std stream). */ #if 0