From 9938a66db4c07104576bce03156d4f8764d3d0e3 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 19 Jan 2021 00:45:20 +0000 Subject: [PATCH] docker-run.sh: use --tty only when we have one --tty is not compatible with github actions, fails with "the input device is not a TTY" Signed-off-by: Marc Herbert --- scripts/docker-run.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 32a2454e78eb..3e6c5870e4b7 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -10,7 +10,15 @@ # To build topology: # ./scripts/docker-run.sh ./scripts/build-tools.sh -docker run -i -t -v "$(pwd)":/home/sof/work/sof.git \ +# set -x + +if tty --quiet; then + SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty" +fi + +docker run -i -v "$(pwd)":/home/sof/work/sof.git \ --env CMAKE_BUILD_TYPE \ --env PRIVATE_KEY_OPTION \ - --user "$(id -u)" sof "$@" + --user "$(id -u)" \ + $SOF_DOCKER_RUN \ + sof "$@"