kgtk icon indicating copy to clipboard operation
kgtk copied to clipboard

kgtk validate does not return a different exit code in case of a validation error

Open zmbq opened this issue 3 years ago • 0 comments

After running kgtk validate on a valid kgtk file, the exit code is 0. Running it again on an invalid file correctly displays the validation error, but the exit code is still 0.

Running kgtk with bad arguments (kgtk validate file.tsv - note the missing -i) does return an exit code of 2.

Expected behavior I would expect kgtk validate to return an exit code of 1 in case of a validation error, so the calling script knows there's something wrong and stop.

zmbq avatar Mar 16 '21 09:03 zmbq