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

main
Jordi Boggiano 9 years ago
parent 35a9b5dbf9
commit 2e73811211

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

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

Loading…
Cancel
Save