]> granicus.if.org Git - php/commitdiff
* list command no longer displays test and data files when listing
authorStig Bakken <ssb@php.net>
Tue, 21 May 2002 02:04:03 +0000 (02:04 +0000)
committerStig Bakken <ssb@php.net>
Tue, 21 May 2002 02:04:03 +0000 (02:04 +0000)
  installed files

pear/PEAR/Command/Registry.php

index 1dea514ac9e49f91c2045ccd4844f3ae51d3c00f..0cbdd393ba65966f7ea0a19673222b3f193417cd 100644 (file)
@@ -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;