From: Stig Bakken Date: Tue, 21 May 2002 02:04:03 +0000 (+0000) Subject: * list command no longer displays test and data files when listing X-Git-Tag: RELEASE_0_10~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eb5ad0f53b7690319756d7131bf9926dcf04708;p=php * list command no longer displays test and data files when listing installed files --- diff --git a/pear/PEAR/Command/Registry.php b/pear/PEAR/Command/Registry.php index 1dea514ac9..0cbdd393ba 100644 --- a/pear/PEAR/Command/Registry.php +++ b/pear/PEAR/Command/Registry.php @@ -98,8 +98,10 @@ Tests if a package is installed in the system. Will exit(1) if it is not. if (PEAR::isError($info)) { return $this->raiseError($info); } - - $list =$info['filelist']; + if ($info === null) { + return $this->raiseError("`$params[0]' not installed"); + } + $list = $info['filelist']; $caption = 'Contents of ' . basename($params[0]); $this->ui->startTable(array('caption' => $caption, 'border' => true)); @@ -113,7 +115,12 @@ Tests if a package is installed in the system. Will exit(1) if it is not. } switch ($att['role']) { case 'test': - $dest = '-- will not be installed --'; break; + case 'data': + if ($installed) { + break 2; + } + $dest = '-- will not be installed --'; + break; case 'doc': $dest = $this->config->get('doc_dir') . DIRECTORY_SEPARATOR . $dest;