Repository: hive Updated Branches: refs/heads/master 4b4580a42 -> 4b3507652
HIVE-14342: Beeline output is garbled when executed from a remote shell (Naveen Gangam, via Chaoyu Tang, reviewed by Mohit Sabharwal) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4b350765 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4b350765 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4b350765 Branch: refs/heads/master Commit: 4b3507652a3f9124fd8df88cd8b3f09e78d5e952 Parents: 4b4580a Author: ctang <[email protected]> Authored: Fri Aug 12 15:23:22 2016 -0400 Committer: ctang <[email protected]> Committed: Fri Aug 12 15:23:22 2016 -0400 ---------------------------------------------------------------------- bin/beeline | 2 +- bin/ext/cli.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/4b350765/bin/beeline ---------------------------------------------------------------------- diff --git a/bin/beeline b/bin/beeline index c23ab22..8f4484c 100644 --- a/bin/beeline +++ b/bin/beeline @@ -23,7 +23,7 @@ bin=`cd "$bin"; pwd` export HADOOP_USER_CLASSPATH_FIRST=true # If process is backgrounded, don't change terminal settings -if [[ ! $(ps -o stat= -p $$) =~ "+" ]]; then +if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal" fi http://git-wip-us.apache.org/repos/asf/hive/blob/4b350765/bin/ext/cli.sh ---------------------------------------------------------------------- diff --git a/bin/ext/cli.sh b/bin/ext/cli.sh index b81648d..4933c2e 100644 --- a/bin/ext/cli.sh +++ b/bin/ext/cli.sh @@ -24,7 +24,7 @@ fi updateBeelineOpts() { # If process is backgrounded, don't change terminal settings - if [[ ! $(ps -o stat= -p $$) == *+ ]]; then + if [[ ( ! $(ps -o stat= -p $$) =~ *+ ) && ! ( -p /dev/stdin ) ]]; then export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal" fi }
