summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-03 11:40:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-03 20:59:48 +0200
commit74260098ffcc14b4991ff424f5326a62bc003399 (patch)
tree1dd770fbc82d886de00250a1c3b2124d834cf98d /sal
parentfa387c3a99ebd033586b6f0a45276016dda56b45 (diff)
log PATH length and content when complaining about it
Change-Id: I54495044f2bd487eb9315c7a974b9859b26235a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 9e4c6e2c048b..2002eb0efb2d 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -271,15 +271,16 @@ public:
manager->load(testlib, args);
} catch (const CppUnit::DynamicLibraryManagerException &e) {
std::cerr << "DynamicLibraryManagerException: \"" << e.what() << "\"\n";
-#ifdef _WIN32
const char *pPath = getenv ("PATH");
- if (pPath && strlen (pPath) > 256)
+ const size_t nPathLen = pPath ? strlen(pPath) : 0;
+#ifdef _WIN32
+ if (nPathLen > 256)
{
std::cerr << "Windows has significant build problems with long PATH variables ";
std::cerr << "please check your PATH variable and re-autogen.\n";
}
#endif
- std::cerr << "Path is '" << getenv("PATH") << "'\n";
+ std::cerr << "Path (length: " << nPathLen << ") is '" << pPath << "'\n";
return false;
}
#endif