From 1971e52e334a8a05f9a598afbd78e2ba3e691eba Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Thu, 6 Jun 2002 06:35:12 +0000 Subject: [PATCH] Fix package command # can't beleive you don't test commits :-) --- pear/PEAR/Command/Package.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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(); } -- 2.40.0