hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject hbase git commit: HBASE-18970 fix hbase shell reading interactive input (Amit Virmani)
Date Wed, 20 Dec 2017 02:42:05 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 f80d2e9c8 -> db5bfedd2


HBASE-18970 fix hbase shell reading interactive input (Amit Virmani)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/db5bfedd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/db5bfedd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/db5bfedd

Branch: refs/heads/branch-2
Commit: db5bfedd2dd6e64d4cdf1c756d3e92958be3ab45
Parents: f80d2e9
Author: Mike Drob <mdrob@apache.org>
Authored: Tue Dec 19 16:36:46 2017 -0600
Committer: Mike Drob <mdrob@apache.org>
Committed: Tue Dec 19 20:41:49 2017 -0600

----------------------------------------------------------------------
 hbase-shell/src/main/ruby/irb/hirb.rb | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/db5bfedd/hbase-shell/src/main/ruby/irb/hirb.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/irb/hirb.rb b/hbase-shell/src/main/ruby/irb/hirb.rb
index 904a000..f8eed2a 100644
--- a/hbase-shell/src/main/ruby/irb/hirb.rb
+++ b/hbase-shell/src/main/ruby/irb/hirb.rb
@@ -40,6 +40,10 @@ module IRB
       devnull = 'NUL' if WINDOZE
       f = File.open(devnull, 'w')
       $stdout = f
+      # This is a workaround for the jruby issue 1372.
+      # The stderr is an input to stty to re-adjust the terminal for the error('stdin isnt
a terminal')
+      # incase the command is piped with hbase shell(eg - >echo 'list' | bin/hbase shell)
+      `stty icrnl <&2`
       super
     ensure
       f.close


Mime
View raw message