Skip to content

Commit

Permalink
fix(test): execution without terminal
Browse files Browse the repository at this point in the history
Error: the input device is not a TTY
  • Loading branch information
alquerci committed Jan 20, 2024
1 parent 0e9e01a commit d06d614
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion test/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ configureWithArguments ()
{
# Commands
#
DOCKER_COMPOSE_EXEC="${DOCKER_COMPOSE} exec -u `id -u`:`id -g`"
DOCKER_COMPOSE_EXEC="${DOCKER_COMPOSE} exec `echoDockerComposeExecuteTtyFlags` -u `id -u`:`id -g`"
INSTALL_GIT_SUB_MODULE='git submodule update --checkout --recursive --force'
COMPOSER_UPDATE='composer update --prefer-dist --no-suggest --optimize-autoloader'

Expand All @@ -125,6 +125,28 @@ configureWithArguments ()
else :; fi
}

echoDockerComposeExecuteTtyFlags ()
{
if hasTty; then
:
else
echo '-T'
fi
}

hasTty ()
{
test -t 0 || {
return 1
}

test -t 1 || {
return 1
}

return 0
}

populatePHPVersions ()
{
if test x'all' = x"${PHP_VERSIONS}"; then
Expand Down

0 comments on commit d06d614

Please sign in to comment.