aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-18 15:48:23 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-18 15:48:23 +0200
commit02843ba4cb041992535c28b266796f75646544b5 (patch)
tree78528a9ce95b7790f4b022366f8279f3119243b4 /src
parent632f989b51985a0036fca5502d9a341b7cded324 (diff)
Fix --attr parsing
Diffstat (limited to 'src')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 3 insertions, 1 deletions
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