From 02843ba4cb041992535c28b266796f75646544b5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Aug 2014 15:48:23 +0200 Subject: [PATCH] Fix --attr parsing --- src/nix-env/nix-env.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index e65dc4e51..44296c7b6 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1402,7 +1402,9 @@ int main(int argc, char * * argv) repair = true; else if (*arg != "" && arg->at(0) == '-') { opFlags.push_back(*arg); - if (*arg == "--from-profile" || *arg == "--atr" || *arg == "-A") /* !!! hack */ + /* FIXME: hacky */ + if (*arg == "--from-profile" || + (op == opQuery && (*arg == "--attr" || *arg == "-A"))) opFlags.push_back(getArg(*arg, arg, end)); } else