You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2019/11/08 11:34:44 UTC
[airflow-site] branch aip-11 updated: Fix process killing by CTRL +
C (#140)
This is an automated email from the ASF dual-hosted git repository.
kamilbregula pushed a commit to branch aip-11
in repository https://gitbox.apache.org/repos/asf/airflow-site.git
The following commit(s) were added to refs/heads/aip-11 by this push:
new e3af23d Fix process killing by CTRL + C (#140)
e3af23d is described below
commit e3af23d4ac716cdd557bd577392832d370ea9f39
Author: Kamil BreguĊa <mi...@users.noreply.github.com>
AuthorDate: Fri Nov 8 12:34:38 2019 +0100
Fix process killing by CTRL + C (#140)
---
site.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/site.sh b/site.sh
index 5d080a1..369ed17 100755
--- a/site.sh
+++ b/site.sh
@@ -116,12 +116,21 @@ function run_command {
working_directory=$1
shift
if [[ -f /.dockerenv ]] ; then
- echo "Native command"
pushd "${working_directory}"
exec "$@"
else
- echo "Docker command"
- docker exec -w "${working_directory}" "${CONTAINER_NAME}" "$@"
+ if ! test -t 0; then
+ docker exec \
+ --interactive \
+ --workdir "${working_directory}" \
+ "${CONTAINER_NAME}" "$@"
+ else
+ docker exec \
+ --tty \
+ --interactive \
+ --workdir "${working_directory}" \
+ "${CONTAINER_NAME}" "$@"
+ fi
fi
}