protected function shouldRedirectToInstaller(\Throwable
$exception, Connection
$connection = NULL
) { // Never redirect on the command line.
if ($this->
isCli()) { return FALSE;
} // Never redirect if we're already in the installer.
if (InstallerKernel::
installationAttempted()) { return FALSE;
} // If the database wasn't found, assume the user hasn't entered it properly
// and redirect to the installer. This check needs to come first because a
// DatabaseNotFoundException is also an instance of DatabaseException.