File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 282282
283283# Helper function to call `docker-compose` in the right context
284284docker_compose () {
285+ local command=" $1 "
286+ shift
287+ local command_options=" "
288+
289+ # We must pass "-T" to docker-compose exec when piping input
290+ if [ " $command " = " exec" ] && [ ! -t 0 ]; then
291+ command_options=" -T"
292+ fi
293+
285294 # Note: Apparently, using --project-directory or --file options for `docker-compose` will break use of `$PWD` in
286295 # docker-compose.yml. Therefore, we `cd` before running `docker-compose` command.
287- (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker-compose " $@ " )
296+ (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker-compose " $command " $command_options " $ @" )
288297}
289298
290299cmd=" $1 "
You can’t perform that action at this time.
0 commit comments