mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
make error code helpful if no releases of a package exist at all
This commit is contained in:
parent
639029bf25
commit
fba7705c99
1 changed files with 6 additions and 1 deletions
|
@ -560,10 +560,15 @@ class PEAR_Installer extends PEAR_Common
|
|||
$remote = new PEAR_Remote($config);
|
||||
if (!PEAR::isError($info = $remote->call('package.info',
|
||||
$origpkgfile))) {
|
||||
return $this->raiseError('No releases of preferred state "'
|
||||
if (!count($info['releases'])) {
|
||||
return $this->raiseError('Package ' . $origpkgfile .
|
||||
' has no releases');
|
||||
} else {
|
||||
return $this->raiseError('No releases of preferred state "'
|
||||
. $state . '" exist for package ' . $origpkgfile .
|
||||
'. Use ' . $origpkgfile . '-state to install another' .
|
||||
' state (like ' . $origpkgfile .'-beta)');
|
||||
}
|
||||
} else {
|
||||
return $pkgfile;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue