mirror of
https://github.com/NixOS/nix
synced 2025-06-30 11:43:15 +02:00
Accept multiple inputs in nix flake update
(cherry picked from commit 9f11b1b0c4
)
This commit is contained in:
parent
b636f1ecd8
commit
31c908a9e2
1 changed files with 12 additions and 10 deletions
|
@ -88,7 +88,8 @@ public:
|
|||
expectArgs({
|
||||
.label="inputs",
|
||||
.optional=true,
|
||||
.handler={[&](std::string inputToUpdate){
|
||||
.handler={[&](std::vector<std::string> inputsToUpdate){
|
||||
for (auto inputToUpdate : inputsToUpdate) {
|
||||
InputPath inputPath;
|
||||
try {
|
||||
inputPath = flake::parseInputPath(inputToUpdate);
|
||||
|
@ -99,6 +100,7 @@ public:
|
|||
if (lockFlags.inputUpdates.contains(inputPath))
|
||||
warn("Input '%s' was specified multiple times. You may have done this by accident.");
|
||||
lockFlags.inputUpdates.insert(inputPath);
|
||||
}
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeInputPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue