mirror of
https://github.com/docker/compose.git
synced 2025-07-26 07:04:32 +02:00
Detect -t and -i separately
Signed-off-by: Chia-liang Kao <clkao@clkao.org>
This commit is contained in:
parent
ed5fedf516
commit
674e541cf7
@ -47,9 +47,10 @@ fi
|
|||||||
|
|
||||||
# Only allocate tty if we detect one
|
# Only allocate tty if we detect one
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
DOCKER_RUN_OPTIONS="-ti"
|
DOCKER_RUN_OPTIONS="-t"
|
||||||
else
|
fi
|
||||||
DOCKER_RUN_OPTIONS="-i"
|
if [ -t 0 ]; then
|
||||||
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec docker run --rm $DOCKER_RUN_OPTIONS $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