mirror of
https://github.com/docker/compose.git
synced 2025-07-27 07:34:10 +02:00
Merge pull request #2513 from punkstar/detect-tty
Only allocate a tty if we detect one
This commit is contained in:
commit
53cc99a822
@ -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