From a56e04ea5ffc46103934629513ce2d5392dca01d Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 18 May 2007 17:49:16 +0000 Subject: [PATCH] - Make alias optioal and return it in info command --- ext/phar/phar/pharcommand.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index f8ab8eebf95..325e23d0dd6 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -31,7 +31,7 @@ class PharCommand extends CLICommand $phar_args = array( 'a' => array( 'typ' => 'alias', - 'val' => 'newphar', + 'val' => NULL, 'inf' => ' Provide an alias name for the phar file.' ), 'c' => array( @@ -218,7 +218,7 @@ class PharCommand extends CLICommand static function cli_cmd_arg_pack() { - $args = self::phar_args('AcFhipsx', 'pharnew'); + $args = self::phar_args('acFhipsx', 'pharnew'); $args[''] = array('typ'=>'any', 'val'=>NULL, 'required'=>1, 'inf'=>' Any number of input files and directories. If -i is in use then ONLY files and matching thegiven regular expression are being packed. If -x is given then files matching that regular expression are NOT being packed.'); return $args; } @@ -784,6 +784,11 @@ class PharCommand extends CLICommand $hash = $phar->getsignature(); $infos = array(); + if ($phar->getAlias()) + { + $infos['Alias'] = $phar->getAlias(); + } + if (!$hash) { $infos['Hash-type'] = 'NONE';