diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 9d33b9cf3d897..18eb5af458aa1 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -3371,6 +3371,9 @@
$content !== ''
$type === 'pdo'
+
+ $vendor
+
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index a94074c37e729..7fe44826d282e 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -393,7 +393,12 @@ public function install($options) {
$config = \OC::$server->getConfig();
$config->setAppValue('core', 'installedat', microtime(true));
$config->setAppValue('core', 'lastupdatedat', microtime(true));
- $config->setAppValue('core', 'vendor', $this->getVendor());
+
+ $vendorData = $this->getVendorData();
+ $config->setAppValue('core', 'vendor', $vendorData['vendor']);
+ if ($vendorData['channel'] !== 'stable') {
+ $config->setSystemValue('updater.release.channel', $vendorData['channel']);
+ }
$group = \OC::$server->getGroupManager()->createGroup('admin');
if ($group instanceof IGroup) {
@@ -582,17 +587,14 @@ public static function protectDataDirectory() {
file_put_contents($baseDir . '/index.html', '');
}
- /**
- * Return vendor from which this version was published
- *
- * @return string Get the vendor
- *
- * Copy of \OC\Updater::getVendor()
- */
- private function getVendor() {
+ private function getVendorData(): array {
// this should really be a JSON file
require \OC::$SERVERROOT . '/version.php';
- /** @var string $vendor */
- return (string)$vendor;
+ /** @var mixed $vendor */
+ /** @var mixed $OC_Channel */
+ return [
+ 'vendor' => (string)$vendor,
+ 'channel' => (string)$OC_Channel,
+ ];
}
}