Skip to content

Commit

Permalink
Transport#transfer() now respects SSH port configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pstadler committed Feb 26, 2014
1 parent 1ea3c48 commit 15015c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions lib/transport/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,14 @@ ShellTransport.prototype.__transfer = function(files, remoteDir, options) {
throw new Error('transfer: empty file list passed');
}

var rsyncFlags = 'az';
if(this.logger.debugEnabled()) {
rsyncFlags += 'v';
}
var rsyncFlags = '-az' + (this.logger.debugEnabled() ? 'v': '');
var _results = [];
var task = function(config) {
var future = new Future();

Fiber(function() {
var cmd = util.format('(echo "%s") | rsync --files-from - -%s --rsh="ssh" ./ %s@%s:%s'
, files, rsyncFlags, config.username, config.host, remoteDir);
var cmd = util.format('(echo "%s") | rsync --files-from - %s --rsh="ssh -p%s" ./ %s@%s:%s'
, files, rsyncFlags, config.port || 22, config.username, config.host, remoteDir);
_results.push(this.exec(cmd, options));
return future.return();
}.bind(this)).run();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flightplan",
"description": "Library for streamlining application deployment or systems administration tasks",
"version": "0.1.6",
"version": "0.1.7",
"author": "Patrick Stadler <[email protected]>",
"keywords": [
"deploy",
Expand Down

0 comments on commit 15015c1

Please sign in to comment.