From fa61ee70ee80b2b223fae86ee197987aa70499b2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 18 Sep 2008 09:08:54 +0000 Subject: [PATCH] * Fix `--from-profile'. --- src/nix-env/nix-env.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index a7fc15904..67bdfb66f 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)