From 3ff8b02d40e9d81e3fa006b00507e33d6f67e1c6 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 12 Sep 2019 15:26:13 +0200 Subject: [PATCH] fix: correctly set compose ``-i`` options only when needed --- Dockerfile | 2 +- bin/compose | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2f1a1d..c7fd823 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ENV KAL_SHLIB_ARRAY_VERSION="0.2.0" \ KAL_SHLIB_CACHE_VERSION="0.0.1" \ KAL_SHLIB_CHARM_VERSION="0.4.1" \ KAL_SHLIB_CMDLINE_VERSION="0.0.5" \ - KAL_SHLIB_COMMON_VERSION="0.4.15" \ + KAL_SHLIB_COMMON_VERSION="0.4.16" \ KAL_SHLIB_CONFIG_VERSION="0.0.2" \ KAL_SHLIB_CORE_VERSION="0.7.0" \ KAL_SHLIB_FIREWALL_VERSION="0.2.0" \ diff --git a/bin/compose b/bin/compose index ee482d7..5fa1fe1 100755 --- a/bin/compose +++ b/bin/compose @@ -199,8 +199,11 @@ run() { done < <(cat "$COMPOSE_LAUNCHER_OPTS") COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose} + if [ -t 0 ]; then + docker_run_opts+=("-i") + fi if [ -t 1 ]; then - docker_run_opts+=("-ti") + docker_run_opts+=("-t") fi exec docker run --rm "${docker_run_opts[@]}" "${COMPOSE_DOCKER_IMAGE}" "$@" }