mik-laj commented on a change in pull request #9219:
URL: https://github.com/apache/airflow/pull/9219#discussion_r438404044



##########
File path: scripts/ci/prepare_tool_scripts.sh
##########
@@ -29,19 +29,28 @@ function prepare_tool_script() {
 
     cat >"${TARGET_TOOL_PATH}" <<EOF
 #!/usr/bin/env bash
-docker run --rm -it \
-    -v "\${HOST_AIRFLOW_SOURCES}/tmp:/tmp" \
-    -v "\${HOST_AIRFLOW_SOURCES}/files:/files" \
-    -v "\${HOST_AIRFLOW_SOURCES}:/opt/airflow" \
-    -v "\${HOST_HOME}/${VOLUME}:/root/${VOLUME}" \
-    "${IMAGE}" ${COMMAND} "\$@"
+DOCKER_ARGS=(
+    -v "\${HOST_AIRFLOW_SOURCES}/tmp:/tmp" \\
+    -v "\${HOST_AIRFLOW_SOURCES}/files:/files" \\
+    -v "\${HOST_AIRFLOW_SOURCES}:/opt/airflow" \\
+    -v "\${HOST_HOME}/${VOLUME}:/root/${VOLUME}" \\
+    --interactive \\
+)
+if [ -t 0 ] ; then
+    DOCKER_ARGS+=(
+        --tty \\
+    )
+fi
+
+docker run "\${DOCKER_ARGS[@]}" "${IMAGE}" "\${@}"
+
 RES=\$?
 if [[ \${HOST_OS} == "Linux" ]]; then
     docker run --rm \
-        -v "\${HOST_AIRFLOW_SOURCES}/tmp:/tmp" \
-        -v "\${HOST_AIRFLOW_SOURCES}/files:/files" \
-        -v "\${HOST_HOME}/${VOLUME}:/root/${VOLUME}" \
-        "\${AIRFLOW_CI_IMAGE}" bash -c \
+        -v "\${HOST_AIRFLOW_SOURCES}/tmp:/tmp" \\

Review comment:
       A single slash in a text string means that the new line is ignored.. We 
want a new line, so we need a double slash.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to