aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authorThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-01-02 17:35:48 +0100
committerThéophane Hufschmitt <theophane.hufschmitt@tweag.io>2023-01-02 17:42:22 +0100
commit8cac451fce990151046996a13130bb1b91c6ba19 (patch)
tree1a01eecc38123fec1204cf10b3b6e3e493932d87 /src/libcmd
parent6a90ef072c2a5fcb7aada94763c7ccdb5ae2bae5 (diff)
Fix why-depends for CA derivations (again)
This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but achieves it in a different way in order to not break `nix why-depends --derivation`.
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/installables.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc
index d2600ca91..b5675d5bd 100644
--- a/src/libcmd/installables.cc
+++ b/src/libcmd/installables.cc
@@ -931,10 +931,7 @@ std::vector<std::pair<std::shared_ptr<Installable>, BuiltPathWithResult>> Instal
DrvOutput outputId { *outputHash, output };
auto realisation = store->queryRealisation(outputId);
if (!realisation)
- throw Error(
- "cannot operate on an output of the "
- "unbuilt derivation '%s'",
- outputId.to_string());
+ throw MissingRealisation(outputId);
outputs.insert_or_assign(output, realisation->outPath);
} else {
// If ca-derivations isn't enabled, assume that