From 9b03b7e915b3ecb200fb02a6bf80b4a42959f00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Mon, 27 Feb 2012 07:07:10 +0100 Subject: [PATCH] Added config directive 'process-timeout' --- src/Composer/Factory.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index a9ed4722a..1198eca51 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -52,6 +52,7 @@ class Factory // Configuration defaults $composerConfig = array( 'vendor-dir' => 'vendor', + 'process-timeout' => 60, ); $packageConfig = $file->read(); @@ -69,9 +70,8 @@ class Factory $binDir = getenv('COMPOSER_BIN_DIR') ?: $packageConfig['config']['bin-dir']; // setup process timeout - if (false !== getenv('COMPOSER_PROCESS_TIMEOUT')) { - ProcessExecutor::setTimeout((int) getenv('COMPOSER_PROCESS_TIMEOUT')); - } + $processTimeout = getenv('COMPOSER_PROCESS_TIMEOUT') ?: $packageConfig['config']['process-timeout'] + ProcessExecutor::setTimeout((int) $processTimeout); // initialize repository manager $rm = $this->createRepositoryManager($io);