mirror of
https://github.com/docker/compose.git
synced 2025-07-26 23:24:05 +02:00
Only allocate a tty if we detect one
Signed-off-by: Nick Jones <nick@nicksays.co.uk>
This commit is contained in:
parent
defcf5a21f
commit
f2c232bb10
@ -43,5 +43,11 @@ if [ -n "$HOME" ]; then
|
|||||||
VOLUMES="$VOLUMES -v $HOME:$HOME"
|
VOLUMES="$VOLUMES -v $HOME:$HOME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Only allocate tty if we detect one
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
DOCKER_RUN_OPTIONS="-ti"
|
||||||
|
else
|
||||||
|
DOCKER_RUN_OPTIONS="-i"
|
||||||
|
fi
|
||||||
|
|
||||||
exec docker run --rm -ti $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w $(pwd) $IMAGE $@
|
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w $(pwd) $IMAGE $@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user