mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02: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