|
@@ -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');
|