about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2018-02-15T16·37+0100
committerGitHub <noreply@github.com>2018-02-15T16·37+0100
commit3a5a241b3209f14f8801b902ba20b5cb0666c9df (patch)
tree5e763196ddad940b5d8c34bedb91cc9df86d790b /src/libmain
parentd26b71fda61196033c27cbac0ffed2a94fd1fe4c (diff)
parent8f186722a97882ba41330684f37bfe8b8637eba8 (diff)
Merge pull request #1873 from matthewbauer/fix-manpath
Set MANPATH in case man path isn’t set correctly.
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 90a4867163df..7d888202bbf1 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -262,6 +262,7 @@ void printVersion(const string & programName)
 void showManPage(const string & name)
 {
     restoreSignals();
+    setenv("MANPATH", settings.nixManDir.c_str(), 1);
     execlp("man", "man", name.c_str(), NULL);
     throw SysError(format("command 'man %1%' failed") % name.c_str());
 }