diff options
author | Mat Marini <mat@marini.ca> | 2020-07-29 20:50:06 -0400 |
---|---|---|
committer | Mat Marini <mat@marini.ca> | 2020-07-29 20:50:06 -0400 |
commit | e4f6f8da77f8de0f19e81f1cbb60052ca92dd371 (patch) | |
tree | 8071e06fac36d4394993b551f323dae3aa0887ed | |
parent | f63839bfa402f73e001a5ee412c3f6a6b95d1a38 (diff) |
Prevent nix-build from accepting --packages
-rwxr-xr-x | src/nix-build/nix-build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index f77de56ea..d8f2fe6d7 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -192,7 +192,7 @@ static void _main(int argc, char * * argv) else if (*arg == "--pure") pure = true; else if (*arg == "--impure") pure = false; - else if (*arg == "--packages" || *arg == "-p") + else if (runEnv && (*arg == "--packages" || *arg == "-p")) packages = true; else if (inShebang && *arg == "-i") { |