mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Detect -t and -i separately
Signed-off-by: Chia-liang Kao <clkao@clkao.org>
This commit is contained in:
parent
dd55415d4f
commit
e6a675f338
@ -47,9 +47,10 @@ fi
|
||||
|
||||
# Only allocate tty if we detect one
|
||||
if [ -t 1 ]; then
|
||||
DOCKER_RUN_OPTIONS="-ti"
|
||||
else
|
||||
DOCKER_RUN_OPTIONS="-i"
|
||||
DOCKER_RUN_OPTIONS="-t"
|
||||
fi
|
||||
if [ -t 0 ]; then
|
||||
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
||||
fi
|
||||
|
||||
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE $@
|
||||
|
Loading…
x
Reference in New Issue
Block a user