From 26e59d106c158a778d8c8d2d0bdc7ee0da7cbe05 Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Tue, 16 Apr 2002 00:22:55 +0000 Subject: [PATCH] Give the right error when wrong params given to package-info and fix/add help some help messages --- pear/PEAR/Command/Package.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php index 40d7e6d0fd..85bade842a 100644 --- a/pear/PEAR/Command/Package.php +++ b/pear/PEAR/Command/Package.php @@ -93,11 +93,12 @@ class PEAR_Command_Package extends PEAR_Command_Common 'Creates a PEAR package from its description file (usually '. "named as package.xml)\n". " -n Return only the created package file name. Useful for\n". - " shell script operations."); + " shell script operations.\n". + " -Z Do not compress the tar package"); case 'package-list': return array('', - 'List the contents of a PEAR package'); - case 'packge-info': + 'List the contents (the files) of a PEAR package'); + case 'package-info': return array('', 'Shows information about a PEAR package'); case 'package-validate': @@ -170,7 +171,7 @@ class PEAR_Command_Package extends PEAR_Command_Common // {{{ package-list case 'package-list': { - // $params[0] -> the PEAR package to list its contents + // $params[0] -> the PEAR package to list its files if (sizeof($params) != 1) { $failmsg = "Command package-list requires a valid PEAR package filename ". " as the first argument. Try the command \"help package-list\""; @@ -221,6 +222,13 @@ class PEAR_Command_Package extends PEAR_Command_Common // {{{ package-info case 'package-info': { + // $params[0] -> the PEAR package to list its information + if (sizeof($params) != 1) { + $failmsg = "Command package-info requires a valid PEAR package filename ". + " as the first argument. Try the command \"help package-info\""; + break; + } + $obj = new PEAR_Common(); if (PEAR::isError($info = $obj->infoFromTgzFile($params[0]))) { return $info; -- 2.50.1