From aa498654c5327b7cd1720ef2c5abf9c2d4adcbc6 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 2 Dec 2025 18:51:11 -0500 Subject: [PATCH] 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 --- lib/private/Setup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 8781127b30a..95a4032be32 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -185,10 +185,11 @@ class Setup { } } - if (\OC_Util::runningOnMac()) { + // Check if running directly on macOS (note: Linux containers on macOS will not trigger this) + if (PHP_OS_FAMILY === 'Darwin') { $errors[] = [ 'error' => $this->l10n->t( - 'Mac OS X is not supported and %s will not work properly on this platform. ' + 'macOS is not supported and %s will not work properly on this platform. ' . 'Use it at your own risk!', [$this->defaults->getProductName()] ),