aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derived-path.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-07-14 20:22:46 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-07-14 20:23:43 -0400
commit8735f55decab03ecf3571f756a22abc3b3dc6304 (patch)
tree38742c11469a47e1bcb6884d917eb4f250b74a84 /src/libstore/derived-path.cc
parentf3262bc2165af90fd20f04f74243aa75137767a2 (diff)
Fix bug, test more, document more
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};
}