Skip to content

Commit aa49865

Browse files
committed
refactor(setup): use OS constant rather than function (macOS)
PHP_OS_FAMILY - Facilitates elimination of a legacy OC_Util method - `runningOnMac()` -- yes, really! ;-) - Supported since PHP late 7.x-era Signed-off-by: Josh <[email protected]>
1 parent d9a7e08 commit aa49865

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/private/Setup.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ public function getSystemInfo(bool $allowAllDatabases = false): array {
185185
}
186186
}
187187

188-
if (\OC_Util::runningOnMac()) {
188+
// Check if running directly on macOS (note: Linux containers on macOS will not trigger this)
189+
if (PHP_OS_FAMILY === 'Darwin') {
189190
$errors[] = [
190191
'error' => $this->l10n->t(
191-
'Mac OS X is not supported and %s will not work properly on this platform. '
192+
'macOS is not supported and %s will not work properly on this platform. '
192193
. 'Use it at your own risk!',
193194
[$this->defaults->getProductName()]
194195
),

0 commit comments

Comments
 (0)