1. Michael Gatto
  2. VersionControl_Hg

Commits

lornajane  committed 6b1370d

use PHP_OS rather than to guess platform

  • Participants
  • Parent commits e404198
  • Branches default

Comments (0)

Files changed (1)

File Trunk/VersionControl/Hg/Executable.php

View file
         $executables = array();
 
         /* Set the binary name per platform */
-        //@todo use PHP_OS (best), php_uname('s'), $_SERVER['OS']
-        switch ($_SERVER['OS']) {
-            case 'Windows_NT':
-                $binary = 'hg.exe';
-                break;
-            default:
-                $binary = 'hg';
-                break;
+        if(substr(strtolower(PHP_OS), 0, 3) == "win") {
+            $binary = 'hg.exe';
+        } else {
+            $binary = 'hg';
         }
 
         if (null !== $path) {