aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-02 11:26:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-02 11:26:24 +0200
commit9469a7be982f5ab17e201c0b62ee555720ac6303 (patch)
treed9bc659b0d0b8b53dcfdbb18e0bdf8de0db5fb47 /build2/b.cxx
parent428ce65eebccc1992695f075e58b62598f771279 (diff)
Trace PATH environment variable
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 4efbdd2..a3861eb 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -4,6 +4,7 @@
#include <time.h> // tzset()
#include <string.h> // strerror()
+#include <stdlib.h> // getenv()
#include <sstream>
#include <cstring> // strcmp(), strchr()
@@ -203,8 +204,11 @@ main (int argc, char* argv[])
if (verb >= 5)
{
- trace << "work dir: " << work;
- trace << "home dir: " << home;
+ const char* p (getenv ("PATH"));
+
+ trace << "work: " << work;
+ trace << "home: " << home;
+ trace << "path: " << (p != nullptr ? p : "<NULL>");
}
// Parse the buildspec.