From 9469a7be982f5ab17e201c0b62ee555720ac6303 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 2 Aug 2016 11:26:24 +0200 Subject: Trace PATH environment variable --- build2/b.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'build2/b.cxx') 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 // tzset() #include // strerror() +#include // getenv() #include #include // 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 : ""); } // Parse the buildspec. -- cgit v1.1