hbase/hbase-shell
Sean Busbey 8b370f7f89 HBASE-26469 correct HBase shell exit behavior to match code passed to exit (#4018)
* refactors how we handle running the passed in initialization script to make use of IRB sessions
  directly instead of reimplementing things ourselves
* simplify how we initialize our IRB config
* insert a shim for capturing exit codes passed via user calls to exit
* make use of user provided exit code unless we're reading stdin in interactive mode

This changes the exit code of the shell. Note that the below can be summarized as lining up with
behavior from earlier HBase releases. This behavior changes in future 2.5+ releases of HBase and
you should see the jira for more details.
* exit called in an initialization script will result in a non-zero exit code iff a non-zero code
  is passed to the exit call.
* when reading user input from stdin, a call to exit will result in a 0 exit code if the shell
  is interactive, and a non-zero exit code if the shell is non-interactive. any optional code
  passed to the call to exit won't change wether the exit code is zero or non-zero.

Signed-off-by: Peter Somogyi <psomogyi@apache.org>
(cherry picked from commit 821e6a36cc)
2022-01-15 14:27:31 -06:00
..
src HBASE-26469 correct HBase shell exit behavior to match code passed to exit (#4018) 2022-01-15 14:27:31 -06:00
pom.xml Preparing development version 2.4.10-SNAPSHOT 2021-12-17 18:52:26 -08:00