1
0
Fork 0

Move comment where it belongs

pull/10757/head
Jordi Boggiano 2022-04-29 13:40:17 +02:00
parent 928e19e637
commit 1f75af6f89
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -79,9 +79,9 @@ class Versions
$channelFile = $this->config->get('home').'/update-channel'; $channelFile = $this->config->get('home').'/update-channel';
$this->channel = $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; $storedChannel = Preg::isMatch('{^\d+$}D', $channel) ? 'stable' : $channel;
$previouslyStored = file_exists($channelFile) ? trim((string) file_get_contents($channelFile)) : null; $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); file_put_contents($channelFile, $storedChannel.PHP_EOL);
if ($io !== null && $previouslyStored !== $storedChannel) { if ($io !== null && $previouslyStored !== $storedChannel) {