lh3 / seqtk

Toolkit for processing sequences in FASTA/Q formats
MIT License
1.38k stars 308 forks source link

error return value #114

Closed mjpworth closed 6 years ago

mjpworth commented 6 years ago

Hello,

Version: 1.2-r102-dirty seems to return 0 when it exits w/ error and when it executes successfully. i ran it with a arg file name that does not exist and while an error message is output: [E::stk_seq] failed to open the input file/stream. the return value captured by system() (in perl) or subprocess.call() (in python) is 0. a non-zero return value on error would be most convenient for error detection in scripting.

thanks for this useful tool.

tseemann commented 6 years ago

@mjpworth i agree, it is important to get the correct return codes (0=success, non-0=failure)

which sub-command of seqtk did you use?

if i give a non-existent filename, it usually just hangs waiting for something .... eg. seqtk fqchk not_exist.fq or seqtk seq not_exist.fa

mjpworth commented 6 years ago

Thanks for the fix.

i just downloaded and installed the corrected version and it works as requested.

thanks again.