diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLine.java b/beeline/src/java/org/apache/hive/beeline/BeeLine.java index 9f84771..406059d 100644 --- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java +++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java @@ -829,10 +829,10 @@ public int begin(String[] args, InputStream inputStream) throws IOException { } } else { int code = initArgsFromCliVars(args); - defaultConnect(false); - if (code != 0){ + if (code != 0 || exit) { return code; } + defaultConnect(false); getOpts().updateBeeLineOptsFromConf(); getOpts().setShowHeader(false); getOpts().setOutputFormat("dsv"); @@ -929,7 +929,7 @@ private int executeFile(String fileName) { /** * Only initial files specified by i option will be executed. The hiverc file will be processed by session manager. * - * @param initFiles + * @param files * @throws IOException */ public void processInitFiles(String[] files) throws IOException {