aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derived-path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/derived-path.cc')
-rw-r--r--src/libstore/derived-path.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc
index 11a3f5e23..f6a0c01df 100644
--- a/src/libstore/derived-path.cc
+++ b/src/libstore/derived-path.cc
@@ -97,8 +97,12 @@ DerivedPath::Built DerivedPath::Built::parse(const Store & store, std::string_vi
{
auto drvPath = store.parseStorePath(drvS);
std::set<std::string> outputs;
- if (outputsS != "*")
+ if (outputsS != "*") {
outputs = tokenizeString<std::set<std::string>>(outputsS, ",");
+ if (outputs.empty())
+ throw Error(
+ "Explicit list of wanted outputs '%s' must not be empty. Consider using '*' as a wildcard meaning all outputs if no output in particular is wanted.", outputsS);
+ }
return {drvPath, outputs};
}