fix(3p/nix): nix-build: don't accept --(im)pure

These options only apply to nix-shell.  The fact that nix-build
previously accepted them was an accident that resulted from the two
programs sharing an implementation.

Change-Id: I0047c98e2096010797316bff3ea4faf722fab86a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1273
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Alyssa Ross 2020-07-18 21:30:28 +00:00
parent 3c9ee24929
commit 7010d4dc86

View file

@ -196,9 +196,9 @@ static void _main(int argc, char** argv) {
} else if (*arg == "--expr" || *arg == "-E") {
fromArgs = true;
} else if (*arg == "--pure") {
} else if (runEnv && *arg == "--pure") {
pure = true;
} else if (*arg == "--impure") {
} else if (runEnv && *arg == "--impure") {
pure = false;
} else if (*arg == "--packages" || *arg == "-p") {