File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
hbase-shell/src/main/ruby Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def initialize(workspace = nil, input_method = nil)
33
33
# happen is the shell exiting because of failed IRB construction with
34
34
# no error (though we're not blanking STDERR)
35
35
36
- # Map the '/dev/null' according to the runing platform
36
+ # Map the '/dev/null' according to the running platform
37
37
# Under Windows platform the 'dev/null' is not fully compliant with unix,
38
38
# and the 'NUL' object need to be use instead.
39
39
devnull = '/dev/null'
@@ -42,8 +42,10 @@ def initialize(workspace = nil, input_method = nil)
42
42
$stdout = f
43
43
# This is a workaround for the jruby issue 1372.
44
44
# 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
47
49
super ( workspace , input_method )
48
50
ensure
49
51
f . close
Original file line number Diff line number Diff line change 38
38
include Java
39
39
40
40
# 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
42
44
require 'pathname'
43
45
require 'getoptlong'
44
46
You can’t perform that action at this time.
0 commit comments