1
0
Fork 0

Reorder self-update opts and correct requirements

pull/2745/head
Pádraic Brady 2014-02-23 12:48:17 +00:00
parent fa6c8eb6c0
commit 4d5515190f
1 changed files with 5 additions and 1 deletions

View File

@ -42,8 +42,9 @@ class SelfUpdateCommand extends Command
->setDefinition(array(
new InputOption('rollback', 'r', InputOption::VALUE_NONE, 'Revert to an older installation of composer'),
new InputOption('clean-backups', null, InputOption::VALUE_NONE, 'Delete old backups during an update. This makes the current version of composer the only backup available after the update'),
new InputOption('disable-tls', null, InputOption::VALUE_NONE, 'Disable SSL/TLS protection for HTTPS requests'),
new InputOption('cafile', null, InputOption::VALUE_REQUIRED, 'The path to a valid CA certificate file for SSL/TLS certificate verification'),
new InputArgument('version', InputArgument::OPTIONAL, 'The version to update to'),
new InputOption('disable-tls', null, InputArgument::VALUE_NONE, 'Disable SSL/TLS protection for HTTPS requests'),
))
->setHelp(<<<EOT
The <info>self-update</info> command checks getcomposer.org for newer
@ -75,6 +76,9 @@ EOT
if (!is_null($config->get('cafile'))) {
$remoteFilesystemOptions = array('ssl'=>array('cafile'=>$config->get('cafile')));
}
if (!is_null($input->get('cafile'))) {
$remoteFilesystemOptions = array('ssl'=>array('cafile'=>$input->get('cafile')));
}
$remoteFilesystem = new RemoteFilesystem($this->getIO(), $remoteFilesystemOptions);
} catch (TransportException $e) {
if (preg_match('|cafile|', $e->getMessage())) {