run-docker.sh: don't rely on GITHUB_EVENT_PATH when checking for tty

This commit is contained in:
Leonid Pliushch 2021-07-27 19:15:35 +03:00
parent 33912b5c78
commit 0a299dc780
No known key found for this signature in database
GPG Key ID: 45F2964132545795

View File

@ -23,11 +23,11 @@ fi
echo "Running container '$CONTAINER_NAME' from image '$TERMUX_BUILDER_IMAGE_NAME'..."
if [ "${GITHUB_EVENT_PATH-x}" != "x" ]; then
# On CI/CD tty may not be available.
DOCKER_TTY=""
else
# Check whether attached to tty and adjust docker flags accordingly.
if [ -t 1 ]; then
DOCKER_TTY=" --tty"
else
DOCKER_TTY=""
fi
$SUDO docker start $CONTAINER_NAME >/dev/null 2>&1 || {