mirror of
https://github.com/docker/compose.git
synced 2025-07-22 21:24:38 +02:00
Fixes pipe handling in container mode.
Closes #4599, #4460 - adds a way to provide options from env in both cases (tty & non tty) - allocates TTY only if both stdin & stdout are TTYs - enables interactive mode if stdin is not TTY Signed-off-by: Arkadiusz Dzięgiel <arkadiusz.dziegiel@glorpen.pl>
This commit is contained in:
parent
ebad981bcc
commit
7f9c042300
@ -47,10 +47,11 @@ if [ -n "$HOME" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Only allocate tty if we detect one
|
# Only allocate tty if we detect one
|
||||||
if [ -t 1 ]; then
|
|
||||||
DOCKER_RUN_OPTIONS="-t"
|
|
||||||
fi
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -t"
|
||||||
|
fi
|
||||||
|
else
|
||||||
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user