diff options
author | Frank M. Kromann <fmk@php.net> | 2004-08-02 17:54:49 +0000 |
---|---|---|
committer | Frank M. Kromann <fmk@php.net> | 2004-08-02 17:54:49 +0000 |
commit | 07979b3ce4bcd2507aade3ae4250139e5bfdcfbf (patch) | |
tree | 501c01fd685f6dbb24298b7cdfa451b47559c089 /win32 | |
parent | 78306b2d1de576c764686455c83153577388f77c (diff) | |
download | php-git-07979b3ce4bcd2507aade3ae4250139e5bfdcfbf.tar.gz |
Search in PATH before explicit_path. This resolves conflict between Microsoft and cygwin tools with the same name.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/confutils.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 76d91cc038..00c1a6d1d7 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.42 2004-07-07 12:25:10 edink Exp $ +// $Id: confutils.js,v 1.43 2004-08-02 17:54:49 fmk Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -456,7 +456,20 @@ function search_paths(thing_to_find, explicit_path, env_name) thing_to_find = thing_to_find.replace(new RegExp("/", "g"), "\\"); - if (explicit_path != null) { + if (env_name != null) { + env = WshShell.Environment("Process").Item(env_name); + env = env.split(";"); + for (i = 0; i < env.length; i++) { + file = glob(env[i] + "\\" + thing_to_find); + if (file) { + found = true; + place = true; + break; + } + } + } + + if (!found && explicit_path != null) { if (typeof(explicit_path) == "string") { explicit_path = explicit_path.split(";"); } @@ -472,19 +485,6 @@ function search_paths(thing_to_find, explicit_path, env_name) } } - if (!found && env_name != null) { - env = WshShell.Environment("Process").Item(env_name); - env = env.split(";"); - for (i = 0; i < env.length; i++) { - file = glob(env[i] + "\\" + thing_to_find); - if (file) { - found = true; - place = true; - break; - } - } - } - if (found && place == true) { STDOUT.WriteLine(" <in default path>"); } else if (found) { |