Make sure a version not found issue is reported as such for clarity, fixes #9500
parent
351b14e32b
commit
35b403b266
|
@ -21,6 +21,7 @@ use Composer\SelfUpdate\Keys;
|
|||
use Composer\SelfUpdate\Versions;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Downloader\FilesystemException;
|
||||
use Composer\Downloader\TransportException;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
@ -211,7 +212,13 @@ EOT
|
|||
|
||||
$io->write(sprintf("Upgrading to version <info>%s</info> (%s channel).", $updateVersion, $channelString));
|
||||
$remoteFilename = $baseUrl . ($updatingToTag ? "/download/{$updateVersion}/composer.phar" : '/composer.phar');
|
||||
$signature = $httpDownloader->get($remoteFilename.'.sig')->getBody();
|
||||
try {
|
||||
$signature = $httpDownloader->get($remoteFilename.'.sig')->getBody();
|
||||
} catch (TransportException $e) {
|
||||
if ($e->getStatusCode() === 404) {
|
||||
throw new \InvalidArgumentException('Version "'.$updateVersion.'" could not be found.', 0, $e);
|
||||
}
|
||||
}
|
||||
$io->writeError(' ', false);
|
||||
$httpDownloader->copy($remoteFilename, $tempFilename);
|
||||
$io->writeError('');
|
||||
|
|
|
@ -110,7 +110,7 @@ class Compiler
|
|||
$finder = new Finder();
|
||||
$finder->files()
|
||||
->ignoreVCS(true)
|
||||
->notPath('/\/(composer\.(json|lock)|[A-Z]+\.md|\.gitignore|phpunit\.xml\.dist|phpstan\.neon\.dist|phpstan-config\.neon)$/')
|
||||
->notPath('/\/(composer\.(json|lock)|[A-Z]+\.md|\.gitignore|appveyor.yml|phpunit\.xml\.dist|phpstan\.neon\.dist|phpstan-config\.neon)$/')
|
||||
->notPath('/bin\/(jsonlint|validate-json|simple-phpunit)(\.bat)?$/')
|
||||
->notPath('symfony/debug/Resources/ext/')
|
||||
->notPath('justinrainbow/json-schema/demo/')
|
||||
|
|
Loading…
Reference in New Issue