From bf6da15fbaf24cdb7f10956ebdbde9fbcc282770 Mon Sep 17 00:00:00 2001 From: SmokingIsBadMkay Date: Sat, 8 Feb 2020 22:30:49 +0100 Subject: [PATCH] Improved non-interactive command support (#1824) The following commands no longer need confirmation when the input is not interactive: - server:bulk-power - server:reinstall --- app/Console/Commands/Server/BulkPowerActionCommand.php | 2 +- app/Console/Commands/Server/BulkReinstallActionCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Server/BulkPowerActionCommand.php b/app/Console/Commands/Server/BulkPowerActionCommand.php index 7c34a56e7..5e728a037 100644 --- a/app/Console/Commands/Server/BulkPowerActionCommand.php +++ b/app/Console/Commands/Server/BulkPowerActionCommand.php @@ -91,7 +91,7 @@ class BulkPowerActionCommand extends Command } $count = $this->repository->getServersForPowerActionCount($servers, $nodes); - if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count]))) { + if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) { return; } diff --git a/app/Console/Commands/Server/BulkReinstallActionCommand.php b/app/Console/Commands/Server/BulkReinstallActionCommand.php index bcafbb95b..b15fbfaa1 100644 --- a/app/Console/Commands/Server/BulkReinstallActionCommand.php +++ b/app/Console/Commands/Server/BulkReinstallActionCommand.php @@ -71,7 +71,7 @@ class BulkReinstallActionCommand extends Command { $servers = $this->getServersToProcess(); - if (! $this->confirm(trans('command/messages.server.reinstall.confirm'))) { + if (! $this->confirm(trans('command/messages.server.reinstall.confirm')) && $this->input->isInteractive()) { return; }