From a40805bf79afa41a07b6f48d36867d5f2adb6fc4 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Mon, 2 Jun 2025 02:17:46 +0200 Subject: [PATCH] Disable TTY --- bin/infisical | 8 +++++++- dist/scripts/src/fetch-secrets.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/infisical b/bin/infisical index a292af9..dfeeaa4 100755 --- a/bin/infisical +++ b/bin/infisical @@ -2,7 +2,13 @@ set -e main() { - declare -a args=("--rm" "--workdir" "${PWD}" "--volume" "${PWD}:${PWD}" "-t") + declare -a args=("--rm" "--workdir" "${PWD}" "--volume" "${PWD}:${PWD}") + + if [ -t 1 ]; then + args+=("-t") + else + args+=("-T") + fi if [ -n "${INFISICAL_TOKEN}" ]; then args+=("--env" "INFISICAL_TOKEN=${INFISICAL_TOKEN}") diff --git a/dist/scripts/src/fetch-secrets.sh b/dist/scripts/src/fetch-secrets.sh index 51e8d89..16aae1a 100755 --- a/dist/scripts/src/fetch-secrets.sh +++ b/dist/scripts/src/fetch-secrets.sh @@ -9,7 +9,7 @@ dc_infisical() { return fi - docker compose run --rm cli infisical "$@" + docker compose run --rm -T cli infisical "$@" } fetch_secret() {