Move comment where it belongs

main
Jordi Boggiano 2 years ago
parent 928e19e637
commit 1f75af6f89
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -79,9 +79,9 @@ class Versions
$channelFile = $this->config->get('home').'/update-channel';
$this->channel = $channel;
// rewrite '2' and '1' channels to stable for future self-updates, but LTS ones like '2.2' remain pinned
$storedChannel = Preg::isMatch('{^\d+$}D', $channel) ? 'stable' : $channel;
$previouslyStored = file_exists($channelFile) ? trim((string) file_get_contents($channelFile)) : null;
// rewrite '2' and '1' channels to stable for future self-updates, but LTS ones like '2.2' remain pinned
file_put_contents($channelFile, $storedChannel.PHP_EOL);
if ($io !== null && $previouslyStored !== $storedChannel) {

Loading…
Cancel
Save