aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/installable-flake.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libcmd/installable-flake.cc b/src/libcmd/installable-flake.cc
index 615f70945..46bdd411b 100644
--- a/src/libcmd/installable-flake.cc
+++ b/src/libcmd/installable-flake.cc
@@ -105,9 +105,14 @@ DerivedPathsWithInfo InstallableFlake::toDerivedPaths()
fmt("while evaluating the flake output attribute '%s'", attrPath)))
{
return { *derivedPathWithInfo };
+ } else {
+ throw Error(
+ "expected flake output attribute '%s' to be a derivation or path but found %s: %s",
+ attrPath,
+ showType(v),
+ ValuePrinter(*this->state, v, errorPrintOptions)
+ );
}
- else
- throw Error("flake output attribute '%s' is not a derivation or path", attrPath);
}
auto drvPath = attr->forceDerivation();