forked from lix-project/lix
nix-shell: Better error message when the shell can't be started
This commit is contained in:
parent
e76df9bd52
commit
d3e1aad421
|
@ -448,15 +448,17 @@ int main(int argc, char ** argv)
|
|||
|
||||
auto envPtrs = stringsToCharPtrs(envStrs);
|
||||
|
||||
auto shell = getEnv("NIX_BUILD_SHELL", "bash");
|
||||
|
||||
environ = envPtrs.data();
|
||||
|
||||
auto argPtrs = stringsToCharPtrs(args);
|
||||
|
||||
restoreSignals();
|
||||
|
||||
execvp(getEnv("NIX_BUILD_SHELL", "bash").c_str(), argPtrs.data());
|
||||
execvp(shell.c_str(), argPtrs.data());
|
||||
|
||||
throw SysError("executing shell");
|
||||
throw SysError("executing shell ‘%s’", shell);
|
||||
}
|
||||
|
||||
// Ugly hackery to make "nix-build -A foo.all" produce symlinks
|
||||
|
|
Loading…
Reference in a new issue