From 4bb519d166d8b24d239b3280a552c272a2eaf7c0 Mon Sep 17 00:00:00 2001 From: Rasmus Nielsen Date: Tue, 25 Apr 2023 15:08:08 +0200 Subject: [PATCH] Add --without-tty option to command --- src/Commands/WatchHorizonCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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));