forked from lix-project/lix
nix-build: set execfail
When starting a nix-shell with `-i` it was previously possible for it to silently fail in the scenario where the specified interpreter didn't exist. This happened due to the `exec` call masking the issue. With this change we enable `execfail`, which causes the script using `nix-shell` as interpreter to correctly exit with code 127. Fixes: #4598
This commit is contained in:
parent
665d4ec2da
commit
6e849e3b0a
|
@ -447,6 +447,7 @@ static void main_nix_build(int argc, char * * argv)
|
|||
"unset NIX_ENFORCE_PURITY; "
|
||||
"shopt -u nullglob; "
|
||||
"unset TZ; %6%"
|
||||
"shopt -s execfail;"
|
||||
"%7%",
|
||||
shellEscape(tmpDir),
|
||||
(pure ? "" : "p=$PATH; "),
|
||||
|
|
Loading…
Reference in a new issue