forked from lix-project/lix
Prevent nix-build from accepting --run/--command
This commit is contained in:
parent
e4f6f8da77
commit
d9e23bfee2
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue