From 8dbfda2221b955dc810827285c5ac874eb0b70d9 Mon Sep 17 00:00:00 2001 From: Marcel de Vries Date: Mon, 23 Oct 2023 15:39:36 +0200 Subject: [PATCH] Only attach TTY for hassio_cli wrapper when not completing command (#334) --- homeassistant-supervised/usr/bin/ha | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant-supervised/usr/bin/ha b/homeassistant-supervised/usr/bin/ha index 12f9318..7310a27 100644 --- a/homeassistant-supervised/usr/bin/ha +++ b/homeassistant-supervised/usr/bin/ha @@ -1,4 +1,10 @@ #!/usr/bin/env bash # shellcheck disable=SC2048,SC2086 -docker exec -t hassio_cli ha $* +if [ "$1" != "__complete" ]; then + use_tty="-t" +else + use_tty="" +fi + +docker exec ${use_tty} hassio_cli ha $*