set correct channel for update-check if switching from apt-installed stable/testing to nightly

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-01-26 13:56:01 +01:00
parent dd765089c9
commit bcf0818faf
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ final class UpdateCommand extends CliCommand
$newversionavail = true; $newversionavail = true;
$output->writeln('<comment>' . $text . '</>'); $output->writeln('<comment>' . $text . '</>');
$result = self::SUCCESS; $result = self::SUCCESS;
} else if ($aucheck < 0 || $aucheck > 1) { } elseif ($aucheck < 0 || $aucheck > 1) {
if ($input->getOption('integer-return')) { if ($input->getOption('integer-return')) {
$output->write(-1); $output->write(-1);
return self::INVALID; return self::INVALID;

View File

@@ -69,7 +69,7 @@ class AutoUpdate
if (Settings::Get('system.update_channel') == 'testing') { if (Settings::Get('system.update_channel') == 'testing') {
$channel = '/testing'; $channel = '/testing';
} elseif (Settings::Get('system.update_channel') == 'nightly') { } elseif (Settings::Get('system.update_channel') == 'nightly') {
if (empty(Froxlor::BRANDING)) { if (empty(Froxlor::BRANDING) || substr(Froxlor::BRANDING, 0, 1) == '-') {
$channel = '/nightly.0000000'; $channel = '/nightly.0000000';
} else { } else {
$channel = '/' . substr(Froxlor::BRANDING, 1); $channel = '/' . substr(Froxlor::BRANDING, 1);