aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nix/flake.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 7b5d8096a..1648c56d0 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -87,11 +87,13 @@ public:
expectArgs({
.label="inputs",
.optional=true,
- .handler={[&](std::string inputToUpdate){
- auto inputPath = flake::parseInputPath(inputToUpdate);
- if (lockFlags.inputUpdates.contains(inputPath))
- warn("Input '%s' was specified multiple times. You may have done this by accident.");
- lockFlags.inputUpdates.insert(inputPath);
+ .handler={[&](std::vector<std::string> inputsToUpdate) {
+ for (const auto & inputToUpdate : inputsToUpdate) {
+ auto inputPath = flake::parseInputPath(inputToUpdate);
+ if (lockFlags.inputUpdates.contains(inputPath))
+ warn("Input '%s' was specified multiple times. You may have done this by accident.", inputToUpdate);
+ lockFlags.inputUpdates.insert(inputPath);
+ }
}},
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
completeFlakeInputPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);