PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #4239

-d option doesnt work on windows

Details

Submitted2005-04-28 12:52 UTC
Fromsmith at backendmedia dot com
StatusBogus
PackagePEAR
PHP Version4.3.11
OSwin xp sp2
Roadmaps(Not assigned)

Comments

[2005-04-28 12:52 UTC] smith at backendmedia dot com

Description:
------------
Appearently this bug does not exist on linux in either a11 or a12.

Running the following code seems to produce the same output on windows and linux though:

<?php
require_once 'Console/Getopt.php';
$argv = Console_Getopt::readPHPArgv();
if (in_array('getopt2', get_class_methods('Console_Getopt'))) {
array_shift($argv);
$options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV");
} else {
$options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:vV");
}
print_r($argv);
print_r($options);

?>

Reproduce code:
---------------
C:\php>pear -d preferred_state=alpha install xml_dtd

Notice: Undefined offset: 1 in pearcmd.php on line 158
Command 'alpha' is not valid, try 'pear help'

C:\php>pear -V
PEAR Version: 1.4.0a11
PHP Version: 4.3.11
Zend Engine Version: 1.3.0
Running on: Windows NT VANDAL 5.1 build 2600

[2005-04-29 10:25 UTC] smith at backendmedia dot com

the test script was written by Betrand (aka toggg aka crappy)
.. credit where credit is due

[2005-05-02 08:00 UTC] smith at backendmedia dot com

yes it works with quotes