diff --git a/src/Commands/ComposerInstall.php b/src/Commands/ComposerInstall.php index c57ce44..e1c2342 100644 --- a/src/Commands/ComposerInstall.php +++ b/src/Commands/ComposerInstall.php @@ -100,8 +100,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int . " --ignore-platform-reqs" . " --no-interaction" . " --no-ansi"; - $response = Shell::run($command, $return_var); - if ($response) $output->writeln($response); + + if ($output->isVerbose()) { + // Stream output live so hangs are visible + $output->writeln(" > {$command}"); + passthru($command . " 2>&1", $return_var); + } else { + $response = Shell::run($command, $return_var); + if ($response) $output->writeln($response); + } if ($return_var) { $output->writeln("Composer install failed (exit code {$return_var})"); } diff --git a/src/Commands/GitPull.php b/src/Commands/GitPull.php index bc55315..cfab3de 100644 --- a/src/Commands/GitPull.php +++ b/src/Commands/GitPull.php @@ -157,10 +157,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int // Update the submodules $logMsg("running submodule update"); - $command = "GIT_TERMINAL_PROMPT=0 timeout 60 git -C " . escapeshellarg($repo_dir) . " submodule update --init --recursive"; - $response = Shell::run($command); - $logMsg("submodule update done"); - if ($response) $output->writeln($response); + $submoduleCmd = "{$envPrefix} timeout 60 git -C " . escapeshellarg($repo_dir) . " submodule update --init --recursive"; + if ($output->isVerbose()) { + $output->writeln(" > {$submoduleCmd}"); + passthru($submoduleCmd . " 2>&1", $subReturn); + } else { + $response = Shell::run($submoduleCmd, $subReturn); + if ($response) $output->writeln($response); + } + $logMsg("submodule update done exit={$subReturn}"); return Command::SUCCESS; }