Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Commands/ComposerInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -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("<error>Composer install failed (exit code {$return_var})</error>");
}
Expand Down
13 changes: 9 additions & 4 deletions src/Commands/GitPull.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading