Skip to content

Commit

Permalink
Fix the command filter to rekey the array
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyworrell authored Mar 27, 2024
1 parent 80627a6 commit 9990547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utility/Rsync.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public function call(Host $host, $source, string $destination, array $config = [
if (!is_array($source)) {
$source = [$source];
}
$command = array_filter(
$command = array_values(array_filter(
array_merge(['rsync', $flags], $options, $source, [$destination]),
function (string $value) {
return $value !== '';
},
);
));

$commandString = $command[0];
for ($i = 1; $i < count($command); $i++) {
Expand Down

0 comments on commit 9990547

Please sign in to comment.