about summary refs log tree commit diff
path: root/src/libutil/args.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r--src/libutil/args.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh
index ef8a7953e520..37e780dd1748 100644
--- a/src/libutil/args.hh
+++ b/src/libutil/args.hh
@@ -164,9 +164,9 @@ public:
     }
 
     /* Expect a string argument. */
-    void expectArg(const std::string & label, string * dest)
+    void expectArg(const std::string & label, string * dest, bool optional = false)
     {
-        expectedArgs.push_back(ExpectedArg{label, 1, false, [=](Strings ss) {
+        expectedArgs.push_back(ExpectedArg{label, 1, optional, [=](Strings ss) {
             *dest = ss.front();
         }});
     }