]> granicus.if.org Git - php/commitdiff
Fix package command
authorTomas V.V.Cox <cox@php.net>
Thu, 6 Jun 2002 06:35:12 +0000 (06:35 +0000)
committerTomas V.V.Cox <cox@php.net>
Thu, 6 Jun 2002 06:35:12 +0000 (06:35 +0000)
# can't beleive you don't test commits :-)

pear/PEAR/Command/Package.php

index 5a5814b9247bf049bc3598eeded7a68dae3f6ba3..7874be2effe3f75de85a8e577f8b006db0afd5f4 100644 (file)
@@ -125,7 +125,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).',
                                         'options' => array(),
                                         'doc' => '
 List all depencies the package has.'
-                                        ),    
+                                        ),
         );
     var $output;
 
@@ -172,23 +172,24 @@ List all depencies the package has.'
             $this->ui->outputData($this->output, $command);
             return;
         }
-        $compress = empty($options['Z']) ? true : false;
+        $compress = empty($options['nocompress']) ? true : false;
         $result = $packager->Package($pkginfofile, $compress);
-        $this->output .= ob_get_contents();
+        $this->output = ob_get_contents();
         ob_end_clean();
         if (PEAR::isError($result)) {
             $this->ui->outputData($this->output, $command);
             return $this->raiseError($result);
         }
         // Don't want output, only the package file name just created
-        if (isset($options['n'])) {
-            $this->output .= $result."\n";
-            return;
+        if (isset($options['showname'])) {
+            $this->output = $result;
         }
-        $lines = explode("\n", $output);
+        /* (cox) What is supposed to do that code?
+        $lines = explode("\n", $this->output);
         foreach ($lines as $line) {
             $this->output .= $line."n";
         }
+        */
         if (PEAR::isError($result)) {
             $this->output .= "Package failed: ".$result->getMessage();
         }