summaryrefslogtreecommitdiffstats
path: root/util.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'util.cxx')
-rw-r--r--util.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.cxx b/util.cxx
index bffeb04e..736e5a30 100644
--- a/util.cxx
+++ b/util.cxx
@@ -244,7 +244,7 @@ tokenize(const string& str, vector<string>& tokens,
// same policy as execvp(). A program name not containing a slash
// will be searched along the $PATH.
-string find_executable(const string& name)
+string find_executable(const string& name, const string& env_path)
{
string retpath;
@@ -259,7 +259,7 @@ string find_executable(const string& name)
}
else // Nope, search $PATH.
{
- char *path = getenv("PATH");
+ char *path = getenv(env_path.c_str());
if (path)
{
// Split PATH up.