From: Tomas V.V.Cox Date: Thu, 6 Jun 2002 06:35:12 +0000 (+0000) Subject: Fix package command X-Git-Tag: RELEASE_0_90~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1971e52e334a8a05f9a598afbd78e2ba3e691eba;p=php Fix package command # can't beleive you don't test commits :-) --- diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php index 5a5814b924..7874be2eff 100644 --- a/pear/PEAR/Command/Package.php +++ b/pear/PEAR/Command/Package.php @@ -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(); }