Prevent nix-build from accepting --run/--command
This commit is contained in:
parent
e4f6f8da77
commit
d9e23bfee2
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ static void _main(int argc, char * * argv)
|
|||
else if (*arg == "--run-env") // obsolete
|
||||
runEnv = true;
|
||||
|
||||
else if (*arg == "--command" || *arg == "--run") {
|
||||
else if (runEnv && (*arg == "--command" || *arg == "--run")) {
|
||||
if (*arg == "--run")
|
||||
interactive = false;
|
||||
envCommand = getArg(*arg, arg, end) + "\nexit";
|
||||
|
|
Loading…
Reference in a new issue