From 9f9116747bbe90bda79982b43a2e652a0eb37c5a Mon Sep 17 00:00:00 2001 From: Josh Salway Date: Tue, 7 Apr 2026 10:09:10 +1000 Subject: [PATCH] Support daemon ID argument in daemon commands DaemonLogsCommand and DaemonRestartCommand define a daemon argument in their signature but never check it, always falling through to the interactive prompt. This checks argument('daemon') first before prompting, enabling non-interactive usage. --- app/Commands/DaemonLogsCommand.php | 2 +- app/Commands/DaemonRestartCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Commands/DaemonLogsCommand.php b/app/Commands/DaemonLogsCommand.php index e538767..219fe1c 100644 --- a/app/Commands/DaemonLogsCommand.php +++ b/app/Commands/DaemonLogsCommand.php @@ -28,7 +28,7 @@ class DaemonLogsCommand extends Command */ public function handle() { - $daemonId = $this->askForDaemon('Which daemon would you like to retrieve the logs from'); + $daemonId = $this->argument('daemon') ?? $this->askForDaemon('Which daemon would you like to retrieve the logs from'); $daemon = $this->forge->daemon($this->currentServer()->id, $daemonId); diff --git a/app/Commands/DaemonRestartCommand.php b/app/Commands/DaemonRestartCommand.php index 5b2b6f1..661b823 100644 --- a/app/Commands/DaemonRestartCommand.php +++ b/app/Commands/DaemonRestartCommand.php @@ -27,7 +27,7 @@ public function handle() { $server = $this->currentServer(); - $daemonId = $this->askForDaemon('Which daemon would you like to restart'); + $daemonId = $this->argument('daemon') ?? $this->askForDaemon('Which daemon would you like to restart'); $daemon = $this->forge->daemon($server->id, $daemonId);