]> granicus.if.org Git - php/commitdiff
Revert the search path tweak; it broke the snap build for ming
authorWez Furlong <wez@php.net>
Tue, 3 Aug 2004 00:58:29 +0000 (00:58 +0000)
committerWez Furlong <wez@php.net>
Tue, 3 Aug 2004 00:58:29 +0000 (00:58 +0000)
win32/build/confutils.js

index e6b6a23c79b9d285e554e8ce0b4cbd0d26ecbfa1..4e8caef03d3d84e3af1784d62a6feea77c952df5 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.45 2004-08-03 00:02:48 wez Exp $
+// $Id: confutils.js,v 1.46 2004-08-03 00:58:29 wez Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -456,20 +456,7 @@ function search_paths(thing_to_find, explicit_path, env_name)
 
        thing_to_find = thing_to_find.replace(new RegExp("/", "g"), "\\");
 
-       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 (explicit_path != null) {
                if (typeof(explicit_path) == "string") {
                        explicit_path = explicit_path.split(";");
                }
@@ -485,6 +472,19 @@ 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) {