facebook/presto — pull request #2016 by nezihyigitbasi (2014-11-25 22:01:03+00:00)
Title: presto-cli should return a proper return code on exit

Currently presto-cli always returns 0 on exit irrespective of the outcome of the query. At Netflix, Genie (https://github.com/Netflix/genie) currently looks at the return code of the presto-cli to determine failures (I know Genie can use the REST API, but that's future work) and for Genie to properly detect failures we had to update the cli to return non-zero on failures and zero on success. Apparently there are other users who ask for this (see #2013 ), which is the reason I created this PR.