-
Notifications
You must be signed in to change notification settings - Fork 203
fix(rsync.php): If local server run rsync to local #53
Conversation
I also run into the same bug, would be awesome to get this fix merged. |
@johnny-bit ping |
Hi @ALL ! Well, this is actually funny. rsync recipe was made to deploy code compiled locally to remote server. In case of local server, I though it should be sufficient to run rsync just like normal operation on "remote server". That's mostly because my dev machine is configured to act as a remote server too (that means I have ssh open, but fortunately I'm on masked network). So... While I'm not opposed to this fix, I'm neither for it, since IMO better fix would be to configure own environment to act like remote server instead of local server. However, this fix adds very little complexity, so if all agree, i se no reason not to include this fix into recipe. |
$identityFile = $server->getPrivateKey() ? ' -i ' . $server->getPrivateKey() : ''; | ||
$user = !$server->getUser() ? '' : $server->getUser() . '@'; | ||
} | ||
|
||
|
||
runLocally("rsync -{$config['flags']} -e 'ssh$port$identityFile' {{rsync_options}}{{rsync_excludes}}{{rsync_includes}}{{rsync_filter}} '$src/' '$user$host:$dst/'", $config['timeout']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will now be executed in both cases which is clearly a bug. It should be inside the else.
@johnny-bit This PR introduces a bug I think. #55 resolves this. |
I haven't caught the bug at a simple look through. I still think that 2016-05-29 19:34 GMT+02:00 Malte Blättermann notifications@github.com:
Pozdrawiam, |
Saw #55 ? It solves this with early return statement and no else. |
Please, rebase your PR. |
Fix bug #52
Proposal fix.
Thank you @nmarniesse.