|
|
@ -252,14 +252,19 @@ class DownloadManager
|
|
|
|
$target->setInstallationSource($installationSource);
|
|
|
|
$target->setInstallationSource($installationSource);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$downloader->update($initial, $target, $targetDir);
|
|
|
|
$downloader->update($initial, $target, $targetDir);
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} catch (\RuntimeException $ex) {
|
|
|
|
} catch (\RuntimeException $e) {
|
|
|
|
if (!$this->io->isInteractive() ||
|
|
|
|
if (!$this->io->isInteractive()) {
|
|
|
|
!$this->io->askConfirmation(' Updating failed. Would you like to try reinstalling instead [<comment>yes</comment>]? ', true)) {
|
|
|
|
throw $e;
|
|
|
|
throw $ex;
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->io->writeError('<error> Update failed ('.$e->getMessage().')');
|
|
|
|
|
|
|
|
if (!$this->io->askConfirmation(' Would you like to try reinstalling the package instead [<comment>yes</comment>]? ', true)) {
|
|
|
|
|
|
|
|
throw $e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$downloader->remove($initial, $targetDir);
|
|
|
|
$downloader->remove($initial, $targetDir);
|
|
|
|
$this->download($target, $targetDir, 'source' === $installationSource);
|
|
|
|
$this->download($target, $targetDir, 'source' === $installationSource);
|
|
|
|
}
|
|
|
|
}
|
|
|
|