diff options
-rw-r--r-- | src/nix-env/nix-env.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index e65dc4e51a64..44296c7b62ed 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 |