diff --git a/src/Commands/WatchHorizonCommand.php b/src/Commands/WatchHorizonCommand.php index 28b05f1..02e8174 100644 --- a/src/Commands/WatchHorizonCommand.php +++ b/src/Commands/WatchHorizonCommand.php @@ -10,7 +10,7 @@ class WatchHorizonCommand extends Command { protected Process $horizonProcess; - protected $signature = 'horizon:watch'; + protected $signature = 'horizon:watch {--without-tty : Disable output to TTY}}'; protected $description = 'Run Horizon and restart it when PHP files are changed'; @@ -31,7 +31,7 @@ protected function startHorizon(): bool { $this->horizonProcess = Process::fromShellCommandline(config('horizon-watcher.command')); - $this->horizonProcess->setTty(true)->setTimeout(null); + $this->horizonProcess->setTty(! $this->option('without-tty') )->setTimeout(null); $this->horizonProcess->start(fn ($type, $output) => $this->info($output));