1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 08:11:47 +02:00

* The `-v' flag no longer takes an argument; it should be repeated

instead (e.g., `-vvvv' for lots of output).  Default is to only
  print error messages.
This commit is contained in:
Eelco Dolstra 2003-07-24 13:43:16 +00:00
parent 3b521bb1bd
commit 0a0c1fcb4d
6 changed files with 29 additions and 38 deletions

View file

@ -307,16 +307,8 @@ void run(Strings args)
op = opVerify;
else if (arg == "--path" || arg == "-p")
pathArgs = true;
else if (arg == "--verbose" || arg == "-v") {
if (it == args.end()) throw UsageError(
format("`%1%' requires an argument") % arg);
istringstream str(*it++);
int lvl;
str >> lvl;
if (str.fail()) throw UsageError(
format("`%1%' requires an integer argument") % arg);
verbosity = (Verbosity) lvl;
}
else if (arg == "--verbose" || arg == "-v")
verbosity = (Verbosity) ((int) verbosity + 1);
else if (arg[0] == '-')
opFlags.push_back(arg);
else