File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 288288
289289# Helper function to call `docker-compose` in the right context
290290docker_compose () {
291- local command=" $1 "
292- shift
293- local command_options=()
294-
295- # We must pass "-T" to docker-compose exec when piping input
296- if [ " $command " = " exec" ] && [ ! -t 0 ]; then
297- command_options+=(-T)
298- fi
299-
300- # Set screen size
301- if [[ " $command " =~ exec| run ]]; then
302- command_options+=(-e COLUMNS=$( tput cols) -e LINES=$( tput lines) )
303- fi
304-
305291 # Note: Apparently, using --project-directory or --file options for `docker-compose` will break use of `$PWD` in
306292 # docker-compose.yml. Therefore, we `cd` before running `docker-compose` command.
307- (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker-compose " $command " ${command_options[@] : + ${command_options[@]} } " $ @" )
293+ (cd " $docker_compose_dir " && COMPOSE_DOMAIN=${COMPOSE_DOMAIN} docker-compose " $@ " )
308294}
309295
310296cmd=" $1 "
You can’t perform that action at this time.
0 commit comments