Skip to content

Commit 72a3d84

Browse files
authored
Rsync does not check emptyness of "became" option (#4074)
#4073
1 parent 1b0cc4e commit 72a3d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utility/Rsync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function call(Host $host, $source, string $destination, array $config = [
6767
if ($connectionOptions !== '') {
6868
$options = array_merge($options, ['-e', "ssh $connectionOptions"]);
6969
}
70-
if ($host->has("become")) {
70+
if ($host->has('become') && !empty($host->get('become'))) {
7171
$options = array_merge($options, ['--rsync-path', "sudo -H -u {$host->get('become')} rsync"]);
7272
}
7373
if (!is_array($source)) {

0 commit comments

Comments
 (0)