Repository: hive
Updated Branches:
  refs/heads/master 247883354 -> fa4c81ade


HIVE-10452: Followup fix for HIVE-10202 to restrict it it for script mode. 
(Naveen Gangam, reviewed by Sergio Pena)


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

Branch: refs/heads/master
Commit: fa4c81ade3ebe5c29f03444be073d07a44e1c74e
Parents: 2478833
Author: Sergio Pena <sergio.p...@cloudera.com>
Authored: Mon May 4 10:00:30 2015 -0500
Committer: Sergio Pena <sergio.p...@cloudera.com>
Committed: Mon May 4 10:00:30 2015 -0500

----------------------------------------------------------------------
 beeline/src/java/org/apache/hive/beeline/BeeLine.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/fa4c81ad/beeline/src/java/org/apache/hive/beeline/BeeLine.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLine.java 
b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
index e207670..0da15f6 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
@@ -809,7 +809,8 @@ public class BeeLine implements Closeable {
       try {
         // Execute one instruction; terminate on executing a script if there 
is an error
         // in silent mode, prevent the query and prompt being echoed back to 
terminal
-        line = getOpts().isSilent() ? reader.readLine(null, 
ConsoleReader.NULL_MASK) : reader.readLine(getPrompt());
+        line = (getOpts().isSilent() && getOpts().getScriptFile() != null) ?
+                 reader.readLine(null, ConsoleReader.NULL_MASK) : 
reader.readLine(getPrompt());
 
         if (!dispatch(line) && exitOnError) {
           return ERRNO_OTHER;

Reply via email to