[Vm-dev] [Pharo-dev] ./pharo --help returns exit code 1 on ubuntu

Ben Coman btc at openinworld.com
Tue May 9 16:10:10 UTC 2017


In the help I see this usage...
    squeak [<option>...] -- [<argument>...]

but I don't grok it enough to test if that is affected by...
   +  if (argv[0][0] == '-' && argv[0][1] == '-')
   + argv[0]++; /* skip one dash in double dash options */


Otherwise there seems no obvious harm in being permissive in handling both
-- or -

Also, maybe just bike-shedding, but
     ./pharo --help

would then display...
   -version              print version information, then exit

instead of current...
   --version              print version information, then exit

Esteban would need to advise whether this is of concern.


btw, anyone wanting try the PR can do...
$ git remote add OpenSmalltalk
https://github.com/OpenSmalltalk/opensmalltalk-vm.git # if you don't
already have it
$ git fetch OpenSmalltalk pull/136/head:dd
$ git checkout dd


cheers -ben

On Tue, May 9, 2017 at 8:39 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
> Hi All,
>
>     I like Subbu's fixing of the error codes.  I'm not sure the accept
> both -- or - need addressing.  Thoughts?
>
> On Sun, May 7, 2017 at 2:32 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
>
>>
>> On Friday 05 May 2017 03:01 AM, Andrei Chis wrote:
>>
>>>
>>> On mac the error code is 0. Also when executing './pharo' or './pharo
>>> Pharo.image --help' or './pharo --version' the error code is 0 on both
>>> mac and linux.
>>> So it seems there is some issues with --help. Actually, it gives a usage
>>> warning, but still I'd expect to not return an error code.
>>>
>>
>> OK, I have uploaded a patch:
>>
>> https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/136
>>
>> that accepts both single and double-dashes for options on unix builds.
>> help or version options return 0 on exit.
>>
>> Regards .. Subbu
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170510/84dcc3e8/attachment.html>


More information about the Vm-dev mailing list