Added config directive 'process-timeout'

main
Martin Hasoň 13 years ago
parent 29a1a2a424
commit 9b03b7e915

@ -52,6 +52,7 @@ class Factory
// Configuration defaults // Configuration defaults
$composerConfig = array( $composerConfig = array(
'vendor-dir' => 'vendor', 'vendor-dir' => 'vendor',
'process-timeout' => 60,
); );
$packageConfig = $file->read(); $packageConfig = $file->read();
@ -69,9 +70,8 @@ class Factory
$binDir = getenv('COMPOSER_BIN_DIR') ?: $packageConfig['config']['bin-dir']; $binDir = getenv('COMPOSER_BIN_DIR') ?: $packageConfig['config']['bin-dir'];
// setup process timeout // setup process timeout
if (false !== getenv('COMPOSER_PROCESS_TIMEOUT')) { $processTimeout = getenv('COMPOSER_PROCESS_TIMEOUT') ?: $packageConfig['config']['process-timeout']
ProcessExecutor::setTimeout((int) getenv('COMPOSER_PROCESS_TIMEOUT')); ProcessExecutor::setTimeout((int) $processTimeout);
}
// initialize repository manager // initialize repository manager
$rm = $this->createRepositoryManager($io); $rm = $this->createRepositoryManager($io);

Loading…
Cancel
Save