diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-02 11:26:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-02 11:26:24 +0200 |
commit | 9469a7be982f5ab17e201c0b62ee555720ac6303 (patch) | |
tree | d9bc659b0d0b8b53dcfdbb18e0bdf8de0db5fb47 | |
parent | 428ce65eebccc1992695f075e58b62598f771279 (diff) |
Trace PATH environment variable
-rw-r--r-- | build2/b.cxx | 8 |
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. |