Skip to content

Commit

Permalink
Merge pull request #13 from rasmuscnielsen/patch-1
Browse files Browse the repository at this point in the history
Add --without-tty option to command
  • Loading branch information
freekmurze committed Apr 25, 2023
2 parents 98b4adb + 4bb519d commit e36a3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Commands/WatchHorizonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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));

Expand Down

0 comments on commit e36a3ff

Please sign in to comment.