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
1 changed files with 4 additions and 2 deletions
|
@ -448,15 +448,17 @@ int main(int argc, char ** argv)
|
||||||
|
|
||||||
auto envPtrs = stringsToCharPtrs(envStrs);
|
auto envPtrs = stringsToCharPtrs(envStrs);
|
||||||
|
|
||||||
|
auto shell = getEnv("NIX_BUILD_SHELL", "bash");
|
||||||
|
|
||||||
environ = envPtrs.data();
|
environ = envPtrs.data();
|
||||||
|
|
||||||
auto argPtrs = stringsToCharPtrs(args);
|
auto argPtrs = stringsToCharPtrs(args);
|
||||||
|
|
||||||
restoreSignals();
|
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
|
// Ugly hackery to make "nix-build -A foo.all" produce symlinks
|
||||||
|
|
Loading…
Reference in a new issue