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 <josh.t.richards@gmail.com>
This commit is contained in:
Josh 2025-12-02 18:51:11 -05:00 committed by Josh Richards
parent d9a7e0855c
commit aa498654c5

View file

@ -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()]
),