Skip to content

Commit bf6da15

Browse files
Improved non-interactive command support (pterodactyl#1824)
The following commands no longer need confirmation when the input is not interactive: - server:bulk-power - server:reinstall
1 parent f9ec96c commit bf6da15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Console/Commands/Server/BulkPowerActionCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function handle()
9191
}
9292

9393
$count = $this->repository->getServersForPowerActionCount($servers, $nodes);
94-
if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count]))) {
94+
if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) {
9595
return;
9696
}
9797

app/Console/Commands/Server/BulkReinstallActionCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function handle()
7171
{
7272
$servers = $this->getServersToProcess();
7373

74-
if (! $this->confirm(trans('command/messages.server.reinstall.confirm'))) {
74+
if (! $this->confirm(trans('command/messages.server.reinstall.confirm')) && $this->input->isInteractive()) {
7575
return;
7676
}
7777

0 commit comments

Comments
 (0)