mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
parent
38374a9d35
commit
112ff7833d
4 changed files with 14 additions and 10 deletions
|
|
@ -146,7 +146,7 @@ bool Args::processArgs(const Strings & args, bool finish)
|
|||
res = true;
|
||||
}
|
||||
|
||||
if (finish && !expectedArgs.empty())
|
||||
if (finish && !expectedArgs.empty() && !expectedArgs.front().optional)
|
||||
throw UsageError("more arguments are required");
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue