$this->setPassOption();
}
- $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
+ try {
+ $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
+ } catch ( \MediaWiki\Installer\InstallException $e ) {
+ $this->output( $e->getStatus()->getMessage()->text() . "\n" );
+ return false;
+ }
$status = $installer->doEnvironmentChecks();
if ( $status->isGood() ) {
} else {
$installer->showStatusMessage( $status );
- return;
+ return false;
}
if ( !$envChecksOnly ) {
- $installer->execute();
+ $status = $installer->execute();
+ if ( !$status->isGood() ) {
+ $installer->showStatusMessage( $status );
+
+ return false;
+ }
$installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) );
+ $installer->showMessage(
+ 'config-install-success',
+ $installer->getVar( 'wgServer' ),
+ $installer->getVar( 'wgScriptPath' )
+ );
}
- $installer->showMessage(
- 'config-install-success',
- $installer->getVar( 'wgServer' ),
- $installer->getVar( 'wgScriptPath' )
- );
+ return true;
}
private function setDbPassOption() {