about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index a7fc15904435..67bdfb66f7f3 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1407,10 +1407,12 @@ void run(Strings args)
             globals.instSource.systemFilter = needArg(i, args, arg);
         else {
             remaining.push_back(arg);
-            if (arg[0] == '-') 
+            if (arg[0] == '-') {
                 opFlags.push_back(arg);
-            else
-                opArgs.push_back(arg);
+                if (arg == "--from-profile") { /* !!! hack */
+                    if (i != args.end()) opFlags.push_back(*i++);
+                }
+            } else opArgs.push_back(arg);
         }
 
         if (oldOp && oldOp != op)