fix: update parameter name for backward compatibility in instant_remote_process

This commit is contained in:
H01001000 2025-12-14 12:57:50 -08:00
parent f4c867a6a7
commit 42c386f4f9
No known key found for this signature in database
GPG key ID: 3794A5F6B719C5DF

View file

@ -120,14 +120,15 @@ function instant_remote_process_with_timeout(Collection|array $command, Server $
function instant_remote_process(
Collection|array $command,
Server|Collection|array $servers,
Server|Collection|array $server,
bool $throwError = true,
bool $no_sudo = false,
?int $timeout = null,
bool $disableMultiplexing = false
): string|array|null {
$command = $command instanceof Collection ? $command->toArray() : $command;
$servers = $servers instanceof Collection ? $servers : collect(is_array($servers) ? $servers : [$servers]);
// Use the variable server instead of servers for backward compatibility
$servers = $server instanceof Collection ? $server : collect(is_array($server) ? $server : [$server]);
return \App\Helpers\SshRetryHandler::retry(
function () use ($servers, $command, $no_sudo, $timeout, $disableMultiplexing) {