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 <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-01-19 00:45:20 +00:00 committed by Liam Girdwood
parent 07d45e4b9a
commit 9938a66db4
1 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,15 @@
# To build topology: # To build topology:
# ./scripts/docker-run.sh ./scripts/build-tools.sh # ./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 CMAKE_BUILD_TYPE \
--env PRIVATE_KEY_OPTION \ --env PRIVATE_KEY_OPTION \
--user "$(id -u)" sof "$@" --user "$(id -u)" \
$SOF_DOCKER_RUN \
sof "$@"