Skip to content

Commit

Permalink
Merge pull request #46353 from nextcloud/skipOPcacheCLI
Browse files Browse the repository at this point in the history
fix(setupchecks): Skip checking for OPcache settings if running checks from CLI
  • Loading branch information
solracsf authored Aug 1, 2024
2 parents f645c9b + fa84f52 commit 4488714
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ protected function getOpcacheSetupRecommendations(): array {
}

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) {
Expand Down

0 comments on commit 4488714

Please sign in to comment.