mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 05:26:02 +01:00
Merge remote-tracking branch 'origin/2.26-maintenance' into detsys-main
This commit is contained in:
commit
6749d26dbb
59 changed files with 708 additions and 403 deletions
|
|
@ -315,20 +315,6 @@ void printVersion(const std::string & programName)
|
|||
throw Exit();
|
||||
}
|
||||
|
||||
|
||||
void showManPage(const std::string & name)
|
||||
{
|
||||
restoreProcessContext();
|
||||
setEnv("MANPATH", settings.nixManDir.c_str());
|
||||
execlp("man", "man", name.c_str(), nullptr);
|
||||
if (errno == ENOENT) {
|
||||
// Not SysError because we don't want to suffix the errno, aka No such file or directory.
|
||||
throw Error("The '%1%' command was not found, but it is needed for '%2%' and some other '%3%' commands' help text. Perhaps you could install the '%1%' command?", "man", name.c_str(), "nix-*");
|
||||
}
|
||||
throw SysError("command 'man %1%' failed", name.c_str());
|
||||
}
|
||||
|
||||
|
||||
int handleExceptions(const std::string & programName, std::function<void()> fun)
|
||||
{
|
||||
ReceiveInterrupts receiveInterrupts; // FIXME: need better place for this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue