1
0
Fork 0

Allow setting the channel without running a complete self-update

pull/6174/merge
Jordi Boggiano 2017-03-06 15:27:42 +01:00
parent 34d7e26f25
commit 5061d90135
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class SelfUpdateCommand extends BaseCommand
new InputOption('stable', null, InputOption::VALUE_NONE, 'Force an update to the stable channel'),
new InputOption('preview', null, InputOption::VALUE_NONE, 'Force an update to the preview channel'),
new InputOption('snapshot', null, InputOption::VALUE_NONE, 'Force an update to the snapshot channel'),
new InputOption('set-channel-only', null, InputOption::VALUE_NONE, 'Only store the channel as the default one and then exit'),
))
->setHelp(<<<EOT
The <info>self-update</info> command checks getcomposer.org for newer
@ -85,6 +86,10 @@ EOT
}
}
if ($input->getOption('set-channel-only')) {
return 0;
}
$cacheDir = $config->get('cache-dir');
$rollbackDir = $config->get('data-dir');
$home = $config->get('home');