mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-21 07:42:24 +01:00
Fix the command filter to rekey the array (#3796)
This commit is contained in:
parent
80627a6883
commit
158181312b
@ -71,12 +71,12 @@ class Rsync
|
|||||||
if (!is_array($source)) {
|
if (!is_array($source)) {
|
||||||
$source = [$source];
|
$source = [$source];
|
||||||
}
|
}
|
||||||
$command = array_filter(
|
$command = array_values(array_filter(
|
||||||
array_merge(['rsync', $flags], $options, $source, [$destination]),
|
array_merge(['rsync', $flags], $options, $source, [$destination]),
|
||||||
function (string $value) {
|
function (string $value) {
|
||||||
return $value !== '';
|
return $value !== '';
|
||||||
},
|
},
|
||||||
);
|
));
|
||||||
|
|
||||||
$commandString = $command[0];
|
$commandString = $command[0];
|
||||||
for ($i = 1; $i < count($command); $i++) {
|
for ($i = 1; $i < count($command); $i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user