Skip to content

Commit 1d97800

Browse files
Merge pull request #46965 from nextcloud/backport/46353/stable29
[stable29] fix(setupchecks): Skip checking for OPcache settings if running checks from CLI
2 parents 84e5b47 + 9d062fb commit 1d97800

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/settings/lib/SetupChecks/PhpOpcacheSetup.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ protected function getOpcacheSetupRecommendations(): array {
131131
}
132132

133133
public function run(): SetupResult {
134+
// Skip OPcache checks if running from CLI
135+
if (\OC::$CLI && !$this->iniGetWrapper->getBool('opcache.enable_cli')) {
136+
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
137+
}
138+
134139
[$level,$recommendations] = $this->getOpcacheSetupRecommendations();
135140
if (!empty($recommendations)) {
136141
return match($level) {

0 commit comments

Comments
 (0)