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 Jun 3, 2024
1 parent 9111e63 commit d28ba6e
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 @@ -879,7 +879,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 @@ -935,7 +935,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 d28ba6e

Please sign in to comment.