diff --git a/inc/composer/class-command.php b/inc/composer/class-command.php index 4c8d31c5..d221163e 100644 --- a/inc/composer/class-command.php +++ b/inc/composer/class-command.php @@ -189,13 +189,16 @@ protected function cli( InputInterface $input, OutputInterface $output ) { $option = $arg . '=' . escapeshellarg( substr( $option, strlen( $arg ) + 1 ) ); } } - + $columns = exec( 'tput cols' ); + $lines = exec( 'tput lines' ); $has_stdin = ! posix_isatty( STDIN ); $command = sprintf( - 'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec %s -u nobody php wp %s', + 'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec -e COLUMNS=%d -e LINES=%d %s -u nobody php wp %s', 'vendor/altis/local-server/docker', getcwd(), $this->get_project_subdomain(), + $columns, + $lines, $has_stdin || ! posix_isatty( STDOUT ) ? '-T' : '', // forward wp-cli's isPiped detection implode( ' ', $options ) );