Skip to content

Commit

Permalink
Keep the same output if the spinner is not available.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiCO2k committed May 28, 2024
1 parent 6c95401 commit 0c0e79b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
}, $commands);
}

if (! $output->isVerbose()) {
if (! $output->isVerbose() && $this->canUseSpinner($input, $output)) {
$commands = array_map(function ($value) {
if (str_starts_with($value, 'chmod')) {
return $value;
Expand Down Expand Up @@ -930,7 +930,11 @@ protected function runCommand(string $command, InputInterface $input, OutputInte
}
}

return tap($process)->run();
$process->run(function ($type, $line) use ($output) {
$output->write(' '.$line);
});

return $process;
}

/**
Expand Down

0 comments on commit 0c0e79b

Please sign in to comment.