diff --git a/inc/composer/class-command.php b/inc/composer/class-command.php index 1982da45..2834520a 100644 --- a/inc/composer/class-command.php +++ b/inc/composer/class-command.php @@ -152,7 +152,7 @@ protected function start( InputInterface $input, OutputInterface $output ) { // Check install was successful. if ( $install_failed ) { - $output->writeln( 'WordPress install failed.' ); + $output->writeln( sprintf( 'WordPress install failed. Exited with error code %d', $install_failed ) ); return $install_failed; } @@ -318,11 +318,15 @@ protected function logs( InputInterface $input, OutputInterface $output ) { } protected function shell( InputInterface $input, OutputInterface $output ) { + $columns = exec( 'tput cols' ); + $lines = exec( 'tput lines' ); passthru( sprintf( - 'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec php /bin/bash', + 'cd %s; VOLUME=%s COMPOSE_PROJECT_NAME=%s docker-compose exec -e COLUMNS=%d -e LINES=%d php /bin/bash', 'vendor/altis/local-server/docker', escapeshellarg( getcwd() ), - $this->get_project_subdomain() + $this->get_project_subdomain(), + $columns, + $lines ), $return_val ); return $return_val;