about summary refs log tree commit diff
path: root/src/fix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fix.cc')
-rw-r--r--src/fix.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fix.cc b/src/fix.cc
index afa0167ecdc0..8463c0ddb15d 100644
--- a/src/fix.cc
+++ b/src/fix.cc
@@ -310,6 +310,16 @@ void run(Strings args)
                 throw UsageError(format("argument required in `%1%'") % arg);
             state.searchDirs.push_back(*it++);
         }
+        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[0] == '-')
             throw UsageError(format("unknown flag `%1%`") % arg);
         else