aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r--src/libutil/args.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc
index 520f50c30..655b3e82f 100644
--- a/src/libutil/args.cc
+++ b/src/libutil/args.cc
@@ -2,7 +2,10 @@
#include "args/root.hh"
#include "hash.hh"
#include "json-utils.hh"
+#include "environment-variables.hh"
+
#include "experimental-features-json.hh"
+#include "logging.hh"
#include <glob.h>
@@ -90,7 +93,6 @@ void RootArgs::parseCmdline(const Strings & _cmdline)
verbosity = lvlError;
}
- bool argsSeen = false;
for (auto pos = cmdline.begin(); pos != cmdline.end(); ) {
auto arg = *pos;
@@ -119,10 +121,6 @@ void RootArgs::parseCmdline(const Strings & _cmdline)
throw UsageError("unrecognised flag '%1%'", arg);
}
else {
- if (!argsSeen) {
- argsSeen = true;
- initialFlagsProcessed();
- }
pos = rewriteArgs(cmdline, pos);
pendingArgs.push_back(*pos++);
if (processArgs(pendingArgs, false))
@@ -132,8 +130,7 @@ void RootArgs::parseCmdline(const Strings & _cmdline)
processArgs(pendingArgs, true);
- if (!argsSeen)
- initialFlagsProcessed();
+ initialFlagsProcessed();
/* Now that we are done parsing, make sure that any experimental
* feature required by the flags is enabled */