diff --git a/hbase-shell/src/main/ruby/irb/hirb.rb b/hbase-shell/src/main/ruby/irb/hirb.rb index 7fc40912489..713cb848c76 100644 --- a/hbase-shell/src/main/ruby/irb/hirb.rb +++ b/hbase-shell/src/main/ruby/irb/hirb.rb @@ -118,6 +118,8 @@ module IRB rescue Interrupt => exc rescue SystemExit, SignalException raise + rescue SyntaxError => exc + raise exc unless @interactive rescue NameError => exc raise exc unless @interactive # HBASE-26880: Ignore NameError to prevent exiting Shell on mistyped commands.