amplab / snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
https://www.microsoft.com/en-us/research/project/snap/
Apache License 2.0
288 stars 66 forks source link

`soft_exit_no_print(1)` returns 1 instead of 0 when calling help #109

Closed mmterpstra closed 4 years ago

mmterpstra commented 7 years ago

Your default help messages return 1 as error code and the default is 0 for a good exit. Here is an example.

./snap-1.0beta.18/snap-aligner index --help
Welcome to SNAP version 1.0beta.18.
... 
$ echo $?
1
$ cat --help
...
$ echo $?
0

Possible solutions (pick whatever catches your fancy)

One of the afflicting soft_exit_no_print(1) statements is present at :

https://github.com/amplab/snap/blob/f11c1314558e73ed802fb3dfa0e7c96f4ccbfdbb/SNAPLib/GenomeIndex.cpp#L94

bolosky commented 4 years ago

Fixed in 1.0. (BTW, this was only ever for the index command.)