Skip to content

Commit

Permalink
Replace fancy option with Ansi check
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 8, 2023
1 parent 9b38729 commit 86cb01b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/framework/src/Console/Commands/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class ServeCommand extends Command
{
/** @var string */
protected $signature = 'serve {--host= : <comment>[default: "localhost"]</comment>}} {--port= : <comment>[default: 8080]</comment>} {--fancy= : <comment>[default: true]</comment>}';
protected $signature = 'serve {--host= : <comment>[default: "localhost"]</comment>}} {--port= : <comment>[default: 8080]</comment>}';

/** @var string */
protected $description = 'Start the realtime compiler server.';
Expand Down Expand Up @@ -57,13 +57,13 @@ protected function getExecutablePath(): string
protected function runServerProcess(string $command): void
{
Process::forever()->run($command, function (string $type, string $line): void {
$this->option('fancy') ? $this->handleOutput($line) : $this->output->write($line);
$this->option('no-ansi') ? $this->output->write($line) : $this->handleOutput($line);
});
}

protected function printStartMessage(): void
{
if ($this->option('fancy')) {
if ($this->option('no-ansi')) {
$this->line('<info>Starting the HydeRC server...</info> Press Ctrl+C to stop');
} else {
$title = 'HydePHP Realtime Compiler';
Expand Down

0 comments on commit 86cb01b

Please sign in to comment.