X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FCliInstaller.php;h=6f39f010069b1d2af8a9c63c5dd09c5c02acb3ad;hp=99d594df972fc3e0d913aa23023c7260ac26bfe3;hb=326d52f9613c5227d75f97361be6ec6ef78b214e;hpb=7af7bbe7476996bf60d8d8e48a84687ccd7505df diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 99d594df97..6f39f01006 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -120,7 +120,11 @@ class CliInstaller extends Installer { } $this->setVar( '_Extensions', $status->value ); } elseif ( isset( $options['with-extensions'] ) ) { - $this->setVar( '_Extensions', array_keys( $this->findExtensions() ) ); + $status = $this->findExtensions(); + if ( !$status->isOK() ) { + throw new InstallException( $status ); + } + $this->setVar( '_Extensions', array_keys( $status->value ) ); } // Set up the default skins @@ -131,7 +135,11 @@ class CliInstaller extends Installer { } $skins = $status->value; } else { - $skins = array_keys( $this->findExtensions( 'skins' ) ); + $status = $this->findExtensions( 'skins' ); + if ( !$status->isOK() ) { + throw new InstallException( $status ); + } + $skins = array_keys( $status->value ); } $this->setVar( '_Skins', $skins ); @@ -190,7 +198,7 @@ class CliInstaller extends Installer { // PerformInstallation bails on a fatal, so make sure the last item // completed before giving 'next.' Likewise, only provide back on failure $lastStepStatus = end( $result ); - if ( $lastStepStatus->isOk() ) { + if ( $lastStepStatus->isOK() ) { return Status::newGood(); } else { return $lastStepStatus; @@ -269,7 +277,8 @@ class CliInstaller extends Installer { } protected function envGetDefaultServer() { - return null; // Do not guess if installing from CLI + // Use a basic value if the user didn't pass in --server + return 'http://localhost'; } public function dirIsExecutable( $dir, $url ) {