File tree Expand file tree Collapse file tree
hbase-shell/src/main/ruby Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def initialize(workspace = nil, input_method = nil)
3333 # happen is the shell exiting because of failed IRB construction with
3434 # no error (though we're not blanking STDERR)
3535
36- # Map the '/dev/null' according to the runing platform
36+ # Map the '/dev/null' according to the running platform
3737 # Under Windows platform the 'dev/null' is not fully compliant with unix,
3838 # and the 'NUL' object need to be use instead.
3939 devnull = '/dev/null'
@@ -42,8 +42,10 @@ def initialize(workspace = nil, input_method = nil)
4242 $stdout = f
4343 # This is a workaround for the jruby issue 1372.
4444 # The stderr is an input to stty to re-adjust the terminal for the error('stdin isnt a terminal')
45- # incase the command is piped with hbase shell(eg - >echo 'list' | bin/hbase shell)
46- `stty icrnl <&2`
45+ # in case the command is piped with hbase shell(eg - >echo 'list' | bin/hbase shell)
46+ if $stdin. tty?
47+ `stty icrnl <&2`
48+ end
4749 super ( workspace , input_method )
4850 ensure
4951 f . close
Original file line number Diff line number Diff line change 3838include Java
3939
4040# Some goodies for hirb. Should these be left up to the user's discretion?
41- require 'irb/completion'
41+ if $stdin. tty?
42+ require 'irb/completion'
43+ end
4244require 'pathname'
4345require 'getoptlong'
4446
You can’t perform that action at this time.
0 commit comments