about summary refs log tree commit diff
path: root/src/libexpr/common-opts.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/common-opts.cc')
-rw-r--r--src/libexpr/common-opts.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libexpr/common-opts.cc b/src/libexpr/common-opts.cc
index 6b393c07df50..c364aa9cb599 100644
--- a/src/libexpr/common-opts.cc
+++ b/src/libexpr/common-opts.cc
@@ -20,14 +20,17 @@ bool parseOptionArg(const string & arg, Strings::iterator & i,
     if (i == argsEnd) throw error;
     string value = *i++;
 
+    /* !!! check for duplicates! */
     Value * v = state.allocValue();
-    autoArgs[state.symbols.create(name)].value = v;
+    autoArgs.push_back(Attr(state.symbols.create(name), v));
 
     if (arg == "--arg")
         state.mkThunk_(*v, parseExprFromString(state, value, absPath(".")));
     else
         mkString(*v, value);
-    
+
+    autoArgs.sort(); // !!! inefficient
+
     return true;
 }