[jira] [Created] (FLINK-13827) shell variable should be escaped in start-scala-shell.sh

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-13827) shell variable should be escaped in start-scala-shell.sh

Shang Yuanchun (Jira)
TisonKun created FLINK-13827:
--------------------------------

             Summary: shell variable should be escaped in start-scala-shell.sh
                 Key: FLINK-13827
                 URL: https://issues.apache.org/jira/browse/FLINK-13827
             Project: Flink
          Issue Type: Bug
          Components: Scala Shell
    Affects Versions: 1.9.0, 1.10.0
            Reporter: TisonKun
             Fix For: 1.10.0, 1.9.1



{code:java}
diff --git a/flink-scala-shell/start-script/start-scala-shell.sh b/flink-scala-shell/start-script/start-scala-shell.sh
index b6da81af72..65b9045584 100644
--- a/flink-scala-shell/start-script/start-scala-shell.sh
+++ b/flink-scala-shell/start-script/start-scala-shell.sh
@@ -97,9 +97,9 @@ log_setting="-Dlog.file="$LOG" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/$LOG
 
 if ${EXTERNAL_LIB_FOUND}
 then
-    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
+    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
 else
-    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@
+    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@
 fi
 
 #restore echo
{code}

otherwise it is error prone when {{$log_setting}} contain arbitrary content.




--
This message was sent by Atlassian Jira
(v8.3.2#803003)