+ $envChecksOnly = $this->hasOption( 'env-checks' );
+
+ $this->setDbPassOption();
+ if ( !$envChecksOnly ) {
+ $this->setPassOption();
+ }
+
+ $installer = InstallerOverrides::getCliInstaller( $siteName, $adminName, $this->mOptions );
+
+ $status = $installer->doEnvironmentChecks();
+ if ( $status->isGood() ) {
+ $installer->showMessage( 'config-env-good' );
+ } else {
+ $installer->showStatusMessage( $status );
+
+ return;
+ }
+ if ( !$envChecksOnly ) {
+ $installer->execute();
+ $installer->writeConfigurationFile( $this->getOption( 'confpath', $IP ) );
+ }
+ }