forked from lix-project/lix
Compare commits
No commits in common. "0b4a54242effc84feb47672577b241cc005bfefd" and "93b7edfd077e056f9deb7656be796ea49a162f51" have entirely different histories.
0b4a54242e
...
93b7edfd07
|
@ -87,13 +87,11 @@ public:
|
||||||
expectArgs({
|
expectArgs({
|
||||||
.label="inputs",
|
.label="inputs",
|
||||||
.optional=true,
|
.optional=true,
|
||||||
.handler={[&](std::vector<std::string> inputsToUpdate) {
|
.handler={[&](std::string inputToUpdate){
|
||||||
for (const auto & inputToUpdate : inputsToUpdate) {
|
auto inputPath = flake::parseInputPath(inputToUpdate);
|
||||||
auto inputPath = flake::parseInputPath(inputToUpdate);
|
if (lockFlags.inputUpdates.contains(inputPath))
|
||||||
if (lockFlags.inputUpdates.contains(inputPath))
|
warn("Input '%s' was specified multiple times. You may have done this by accident.");
|
||||||
warn("Input '%s' was specified multiple times. You may have done this by accident.");
|
lockFlags.inputUpdates.insert(inputPath);
|
||||||
lockFlags.inputUpdates.insert(inputPath);
|
|
||||||
}
|
|
||||||
}},
|
}},
|
||||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||||
completeFlakeInputPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
completeFlakeInputPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
||||||
|
@ -134,15 +132,6 @@ struct CmdFlakeLock : FlakeCommand
|
||||||
|
|
||||||
CmdFlakeLock()
|
CmdFlakeLock()
|
||||||
{
|
{
|
||||||
addFlag({
|
|
||||||
.longName="update-input",
|
|
||||||
.description="Replaced with `nix flake update input...`",
|
|
||||||
.labels={"input-path"},
|
|
||||||
.handler={[&](std::string inputToUpdate){
|
|
||||||
throw UsageError("`nix flake lock --update-input %1%` has been replaced by `nix flake update %1%`", inputToUpdate);
|
|
||||||
}}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Remove flags that don't make sense. */
|
/* Remove flags that don't make sense. */
|
||||||
removeFlag("no-write-lock-file");
|
removeFlag("no-write-lock-file");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue