From d3df747cb6813fc5f9d0fcc63d6fd16292c92e04 Mon Sep 17 00:00:00 2001 From: regnat Date: Fri, 23 Apr 2021 09:34:43 +0200 Subject: [PATCH] Revert "Make `nix shell` fallback to static outputs when needed" This reverts commit 8d66f5f1107fe87f70ea24ade045720235cc31fa. This fix isn't needed anymore now that the realisations are always properly registered --- src/libcmd/installables.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 10855688c..06ef4c669 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -736,18 +736,9 @@ std::set toRealisedPaths( output.first); auto outputId = DrvOutput{outputHashes.at(output.first), output.first}; auto realisation = store->queryRealisation(outputId); - if (!realisation) { - // TODO: remove this check once #4725 is fixed - // as we’ll have the guaranty that if - // `output.second` exists, then the realisation - // will be there too - if (output.second) - res.insert(*output.second); - else - throw Error("cannot operate on an output of unbuilt content-addresed derivation '%s'", outputId.to_string()); - } else { - res.insert(RealisedPath{*realisation}); - } + if (!realisation) + throw Error("cannot operate on an output of unbuilt content-addresed derivation '%s'", outputId.to_string()); + res.insert(RealisedPath{*realisation}); } else { // If ca-derivations isn't enabled, behave as if