You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2015/05/16 03:38:46 UTC

[7/7] drill git commit: DRILL-3115: SQLLine colors do not work well with CYGWIN

DRILL-3115: SQLLine colors do not work well with CYGWIN


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

Branch: refs/heads/master
Commit: 13a0c3c70991f29ca240adcac32b11b0d4fef21e
Parents: e877417
Author: Aditya Kishore <ad...@apache.org>
Authored: Fri May 15 16:57:33 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:41:52 2015 -0700

----------------------------------------------------------------------
 distribution/src/resources/sqlline | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/13a0c3c7/distribution/src/resources/sqlline
----------------------------------------------------------------------
diff --git a/distribution/src/resources/sqlline b/distribution/src/resources/sqlline
index 2c9c783..e494a72 100644
--- a/distribution/src/resources/sqlline
+++ b/distribution/src/resources/sqlline
@@ -45,10 +45,14 @@ bin=`cd "$bin">/dev/null; pwd`
 
 DRILL_SHELL_JAVA_OPTS="$DRILL_SHELL_JAVA_OPTS -Dlog.path=$DRILL_LOG_DIR/sqlline.log -Dlog.query.path=$DRILL_LOG_DIR/sqlline_queries.json"
 
+if ! $is_cygwin; then
+  DRILL_SHELL_OPTS="$DRILL_SHELL_OPTS --color=true"
+fi
+
 if [ -n "$QUERY" ] ; then
   echo $QUERY | exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver  --maxWidth=10000 "${ARGS[@]}"
 elif [ -n "$FILE" ] ; then
   exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver  --maxWidth=10000 "${ARGS[@]}" --run=$FILE
 else
-  exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine --color=true -d org.apache.drill.jdbc.Driver --maxWidth=10000 "${ARGS[@]}"
+  exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver --maxWidth=10000 $DRILL_SHELL_OPTS "${ARGS[@]}"
 fi