summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2004-08-02 17:54:49 +0000
committerFrank M. Kromann <fmk@php.net>2004-08-02 17:54:49 +0000
commit07979b3ce4bcd2507aade3ae4250139e5bfdcfbf (patch)
tree501c01fd685f6dbb24298b7cdfa451b47559c089 /win32
parent78306b2d1de576c764686455c83153577388f77c (diff)
downloadphp-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.js30
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) {