Merge pull request #46353 from nextcloud/skipOPcacheCLI

fix(setupchecks): Skip checking for OPcache settings if running checks from CLI
pull/46591/head
Git'Fellow 2024-08-01 20:02:25 +07:00 committed by GitHub
commit 4488714148
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

@ -114,6 +114,11 @@ class PhpOpcacheSetup implements ISetupCheck {
}
public function run(): SetupResult {
// Skip OPcache checks if running from CLI
if (\OC::$CLI && !$this->iniGetWrapper->getBool('opcache.enable_cli')) {
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
}
[$level,$recommendations] = $this->getOpcacheSetupRecommendations();
if (!empty($recommendations)) {
return match($level) {