Skip to content

Commit

Permalink
DRILL-3115: SQLLine colors do not work well with CYGWIN
Browse files Browse the repository at this point in the history
  • Loading branch information
adityakishore authored and jacques-n committed May 16, 2015
1 parent e877417 commit 13a0c3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distribution/src/resources/sqlline
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 13a0c3c

Please sign in to comment.