[CC vm-dev] On Sat, May 6, 2017 at 7:04 PM, K K Subbu <kksubbu.ml@gmail.com> wrote:
On Friday 05 May 2017 02:11 PM, Andrei Chis wrote:
... ./pharo -help unknown option: -help Common <option>s: --help print this help message, then exit
Then `./pharo -help` returns an exit code of 1 on mac/linux while `./pharo --help` returns a exit code of 0 on mac and 1 on linux.
It is --help on Pharo and -help on other compiles (see below). Can anyone shed light on the legacy compatibility comment in :
---- platforms/unix/vm/sqUnixMain.c ---- 1421 /* legacy compatibility */ /*** XXX to be removed at some time ***/ 1422
Looking just at just the file, it appears this is comment is strongly associated with the code below, but git blame [1] indicates the comment is 7 years old, while the code below is 7 months old. ??? [1] https://github.com/OpenSmalltalk/opensmalltalk-vm/blame/995e7aedc3b5aeb76904... cheers -ben
1423 #ifdef PharoVM 1424 # define VMOPTION(arg) "--"arg 1425 #else 1426 # define VMOPTION(arg) "-"arg 1427 #endif
It's still not clear why running the vm to print the help of the version
should exit with an error code.
Agreed. I think --help and --version should return 0. I think the 1 was to catch incorrect/unknown arguments.
If I learn the rationale behind the change, I can propose a patch to fix this.
Regards .. Subbu