Skip to content

Commit d28ba6e

Browse files
committed
Keep the same output if the spinner is not available.
1 parent 9111e63 commit d28ba6e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/NewCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ protected function runCommands($commands, InputInterface $input, OutputInterface
879879
}, $commands);
880880
}
881881

882-
if (! $output->isVerbose()) {
882+
if (! $output->isVerbose() && $this->canUseSpinner($input, $output)) {
883883
$commands = array_map(function ($value) {
884884
if (str_starts_with($value, 'chmod')) {
885885
return $value;
@@ -935,7 +935,11 @@ protected function runCommand(string $command, InputInterface $input, OutputInte
935935
}
936936
}
937937

938-
return tap($process)->run();
938+
$process->run(function ($type, $line) use ($output) {
939+
$output->write(' '.$line);
940+
});
941+
942+
return $process;
939943
}
940944

941945
/**

0 commit comments

Comments
 (0)