forked from lix-project/lix
Merge pull request #3879 from illiusdope/nix-build-shell-flags
Prevent nix-build from accepting nix-shell flags
This commit is contained in:
commit
3f3740d676
|
@ -174,7 +174,7 @@ static void _main(int argc, char * * argv)
|
||||||
else if (*arg == "--run-env") // obsolete
|
else if (*arg == "--run-env") // obsolete
|
||||||
runEnv = true;
|
runEnv = true;
|
||||||
|
|
||||||
else if (*arg == "--command" || *arg == "--run") {
|
else if (runEnv && (*arg == "--command" || *arg == "--run")) {
|
||||||
if (*arg == "--run")
|
if (*arg == "--run")
|
||||||
interactive = false;
|
interactive = false;
|
||||||
envCommand = getArg(*arg, arg, end) + "\nexit";
|
envCommand = getArg(*arg, arg, end) + "\nexit";
|
||||||
|
@ -192,7 +192,7 @@ static void _main(int argc, char * * argv)
|
||||||
else if (*arg == "--pure") pure = true;
|
else if (*arg == "--pure") pure = true;
|
||||||
else if (*arg == "--impure") pure = false;
|
else if (*arg == "--impure") pure = false;
|
||||||
|
|
||||||
else if (*arg == "--packages" || *arg == "-p")
|
else if (runEnv && (*arg == "--packages" || *arg == "-p"))
|
||||||
packages = true;
|
packages = true;
|
||||||
|
|
||||||
else if (inShebang && *arg == "-i") {
|
else if (inShebang && *arg == "-i") {
|
||||||
|
|
Loading…
Reference in a new issue