Only attach TTY for hassio_cli wrapper when not completing command

This commit is contained in:
Marcel de Vries 2023-10-23 15:02:50 +02:00 committed by GitHub
parent 21a9d0b3f3
commit 6f8714e900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 $*