1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Warn when require ends up auto-selecting a feature branch, fixes #11264 (#11270)

This commit is contained in:
Jordi Boggiano 2023-01-19 21:42:09 +01:00 committed by GitHub
parent c7f32820d7
commit 0d96fd8149
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 3 deletions

View file

@ -147,7 +147,7 @@ class Application extends BaseApplication
$this->disableScriptsByDefault = $input->hasParameterOption('--no-scripts');
$stdin = defined('STDIN') ? STDIN : fopen('php://stdin', 'r');
if (Platform::getEnv('COMPOSER_NO_INTERACTION') || $stdin === false || !Platform::isTty($stdin)) {
if (Platform::getEnv('COMPOSER_TESTS_ARE_RUNNING') !== '1' && (Platform::getEnv('COMPOSER_NO_INTERACTION') || $stdin === false || !Platform::isTty($stdin))) {
$input->setInteractive(false);
}