From 15015c19655c234a0f4a11452fdc9afb1bd335b6 Mon Sep 17 00:00:00 2001 From: Patrick Stadler Date: Wed, 26 Feb 2014 08:46:08 +0100 Subject: [PATCH] Transport#transfer() now respects SSH port configuration --- lib/transport/shell.js | 9 +++------ package.json | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/transport/shell.js b/lib/transport/shell.js index 1f9f452..2024b17 100644 --- a/lib/transport/shell.js +++ b/lib/transport/shell.js @@ -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(); diff --git a/package.json b/package.json index 9efdcc0..7d14f4e 100644 --- a/package.json +++ b/package.json @@ -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 ", "keywords": [ "deploy",