about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-24T13·43+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-24T13·43+0000
commit0a0c1fcb4d0e42577ac0c7ac23bd9b908ecde49f (patch)
treec52d0c7f02f6a61d1bc48dbe3474daeca1471b25 /src/nix.cc
parent3b521bb1bd53479896de89e7a24938039f92aace (diff)
* 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.

Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nix.cc b/src/nix.cc
index f672c42a80..3345f983fb 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -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