]> granicus.if.org Git - php/commitdiff
The first entry in argv is the command name, so Getopt will stop
authorTomas V.V.Cox <cox@php.net>
Sun, 12 May 2002 16:30:26 +0000 (16:30 +0000)
committerTomas V.V.Cox <cox@php.net>
Sun, 12 May 2002 16:30:26 +0000 (16:30 +0000)
parsing more args
# Stig be carefull, your change to Getopt breaks BC

pear/scripts/pear.in

index 4a386697729a32b6f73eeb5e71ab39b6d930cf8b..edcbc8900d3410ddb243ce2992c6ada675cd8c3f 100644 (file)
@@ -35,8 +35,8 @@ $all_commands = PEAR_Command::getCommands();
 $cmd_options  = PEAR_Command::getOptions();
 $progname = basename(__FILE__);
 
-// XXX change Getopt to use raiseError() ?
 $argv = Console_Getopt::readPHPArgv();
+array_shift($argv);
 $options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:v" . $cmd_options);
 if (PEAR::isError($options)) {
     usage($options);