Browse Source

Fix process timeout not being initialized correctly when loading a config without creating a full composer instance, closes #3952, fixes #3946

Jordi Boggiano 10 years ago
parent
commit
2e73811211
2 changed files with 4 additions and 3 deletions
  1. 0 3
      src/Composer/Factory.php
  2. 4 0
      src/Composer/IO/BaseIO.php

+ 0 - 3
src/Composer/Factory.php

@@ -249,9 +249,6 @@ class Factory
         if ($fullLoad) {
             // load auth configs into the IO instance
             $io->loadConfiguration($config);
-
-            // setup process timeout
-            ProcessExecutor::setTimeout((int) $config->get('process-timeout'));
         }
 
         // initialize event dispatcher

+ 4 - 0
src/Composer/IO/BaseIO.php

@@ -13,6 +13,7 @@
 namespace Composer\IO;
 
 use Composer\Config;
+use Composer\Util\ProcessExecutor;
 
 abstract class BaseIO implements IOInterface
 {
@@ -75,5 +76,8 @@ abstract class BaseIO implements IOInterface
                 $this->setAuthentication($domain, $cred['username'], $cred['password']);
             }
         }
+
+        // setup process timeout
+        ProcessExecutor::setTimeout((int) $config->get('process-timeout'));
     }
 }