1
0
Fork 0

Add COMPOSER_NO_INTERACTION env var to allow travis & others to easily make sure every composer run is non-interactive

pull/1760/head
Jordi Boggiano 2013-04-02 10:34:49 +02:00
parent ffba012673
commit 83ea90296e
2 changed files with 9 additions and 0 deletions

View File

@ -423,4 +423,9 @@ configuration in the project's `composer.json` always wins.
This env var controls the time composer waits for commands (such as git This env var controls the time composer waits for commands (such as git
commands) to finish executing. The default value is 300 seconds (5 minutes). commands) to finish executing. The default value is 300 seconds (5 minutes).
### COMPOSER_NO_INTERACTION
If set to 1, this env var will make composer behave as if you passed the
`--no-interaction` flag to every command. This can be set on build boxes/CI.
← [Libraries](02-libraries.md) | [Schema](04-schema.md) → ← [Libraries](02-libraries.md) | [Schema](04-schema.md) →

View File

@ -100,6 +100,10 @@ class Application extends BaseApplication
} }
} }
if (getenv('COMPOSER_NO_INTERACTION')) {
$input->setInteractive(false);
}
if ($input->hasParameterOption('--profile')) { if ($input->hasParameterOption('--profile')) {
$startTime = microtime(true); $startTime = microtime(true);
$this->io->enableDebugging($startTime); $this->io->enableDebugging($startTime);