Merge pull request #12497 from xokdvium/fix/dont-override-default-man-search-paths

Don't override default man search paths
This commit is contained in:
John Ericson
2025-02-18 11:31:01 -05:00
committed by GitHub

View File

@@ -13,7 +13,7 @@ std::filesystem::path getNixManDir()
void showManPage(const std::string & name)
{
restoreProcessContext();
setEnv("MANPATH", getNixManDir().c_str());
setEnv("MANPATH", (getNixManDir().string() + ":").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.