Skip to content

Commit

Permalink
Strict installation check
Browse files Browse the repository at this point in the history
Previously if you restored the DB and then tried to run another command, Craft would report that it was not yet installed.

The strict test makes sure we're getting an accurage value from `ApplicationTrait::getIsInstalled()` before we show the user a warning

Fixes #12101
  • Loading branch information
brianjhanson committed Oct 12, 2022
1 parent 1039431 commit 07a21f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function bootstrap(): void
*/
public function runAction($route, $params = []): int|BaseResponse|null
{
if (!$this->getIsInstalled() && $this->_requireInfoTable($route, $params)) {
if (!$this->getIsInstalled(true) && $this->_requireInfoTable($route, $params)) {
// Is the connection valid at least?
if (!$this->getIsDbConnectionValid()) {
Console::outputWarning('Craft can’t connect to the database. Check your connection settings.');
Expand Down

0 comments on commit 07a21f6

Please sign in to comment.