Repository: hive Updated Branches: refs/heads/branch-2.1 79a19dbd7 -> b8903b36b
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/b8903b36 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b8903b36 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b8903b36 Branch: refs/heads/branch-2.1 Commit: b8903b36b9a1fa2a2363c2c5299810b11779a97d Parents: 79a19db Author: ctang <[email protected]> Authored: Fri Aug 12 15:23:22 2016 -0400 Committer: ctang <[email protected]> Committed: Fri Aug 12 15:24:09 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/b8903b36/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/b8903b36/bin/ext/cli.sh ---------------------------------------------------------------------- diff --git a/bin/ext/cli.sh b/bin/ext/cli.sh index 847cf0d..c50f36e 100644 --- a/bin/ext/cli.sh +++ b/bin/ext/cli.sh @@ -23,7 +23,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 }
