broadinstitute / gdctools

Python and UNIX CLI utilities to simplify interaction with the NIH/NCI Genomics Data Commons
Other
31 stars 4 forks source link

Some tools do not return proper exit code to invocation context (e.g. shell) #58

Closed noblem closed 6 years ago

noblem commented 6 years ago

For example:

vgdac1%   which gdc_mirror
/xchip/tcga/Tools/gdac/bin/gdc_mirror

vgdac1%    gdc_mirror --version
0.9.1 (GDCtools: 0.2.4)

vgdac1 %  gdc_mirror --config=/xchip/tcga/Tools/gdac/bin/tcga.cfg --programs DUMMY
Program DUMMY not found in GDC, ignoring
Cannot determine programs or projects from config file or command line flags
/home/unix/mnoble(vgdac1) echo $?
0

But 1 should be the exit code because gabort(1, ...) is called, which in turn calls sys.exit(1) to terminate

noblem commented 6 years ago

Fixed in commit https://github.com/broadinstitute/gdctools/commit/6f2b9ad460606b48b1f73a413b248f77692bf6a8