1
0
Fork 0

Revert a few changes to ConfigCommand

pull/9165/head
Jordi Boggiano 2020-09-07 16:24:15 +02:00 committed by GitHub
parent fc87caf639
commit b8ebc7be5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -474,7 +474,7 @@ EOT
), ),
); );
if ((isset($uniqueConfigValues[$settingKey]) || isset($multiConfigValues[$settingKey])) && $input->getOption('unset')) { if ($input->getOption('unset') && (isset($uniqueConfigValues[$settingKey]) || isset($multiConfigValues[$settingKey]))) {
if ($settingKey === 'disable-tls' && $this->config->get('disable-tls')) { if ($settingKey === 'disable-tls' && $this->config->get('disable-tls')) {
$this->getIO()->writeError('<info>You are now running Composer with SSL/TLS protection enabled.</info>'); $this->getIO()->writeError('<info>You are now running Composer with SSL/TLS protection enabled.</info>');
} }
@ -568,7 +568,7 @@ EOT
if ($input->getOption('global') && (isset($uniqueProps[$settingKey]) || isset($multiProps[$settingKey]) || substr($settingKey, 0, 6) === 'extra.')) { if ($input->getOption('global') && (isset($uniqueProps[$settingKey]) || isset($multiProps[$settingKey]) || substr($settingKey, 0, 6) === 'extra.')) {
throw new \InvalidArgumentException('The '.$settingKey.' property can not be set in the global config.json file. Use `composer global config` to apply changes to the global composer.json'); throw new \InvalidArgumentException('The '.$settingKey.' property can not be set in the global config.json file. Use `composer global config` to apply changes to the global composer.json');
} }
if ((isset($uniqueProps[$settingKey]) || isset($multiProps[$settingKey])) && $input->getOption('unset')) { if ($input->getOption('unset') && (isset($uniqueProps[$settingKey]) || isset($multiProps[$settingKey]))) {
$this->configSource->removeProperty($settingKey); $this->configSource->removeProperty($settingKey);
return 0; return 0;
@ -605,7 +605,7 @@ EOT
$value = strtolower($values[0]); $value = strtolower($values[0]);
if (true === $booleanValidator($value)) { if (true === $booleanValidator($value)) {
if (false === $booleanNormalizer($value)) { if (false === $booleanNormalizer($value)) {
$this->configSource->addRepository($matches[1], []); $this->configSource->addRepository($matches[1], false);
return 0; return 0;
} }