Skip to content

Commit

Permalink
SSHTransport#exec(cmd, options) now passes options.exec to ssh2#exec().
Browse files Browse the repository at this point in the history
close #7
  • Loading branch information
pstadler committed Mar 5, 2014
1 parent 4192b34 commit 8d8b904
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/transport/ssh.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ function SSHTransport(flight, target) {
_fiber.run();
});

this.connection.on('close', function() {
// TODO
});

var options = util._extend({}, this.target); // clone
delete options.exec;
this.connection.connect(this.target);

return Fiber.yield();
Expand All @@ -37,7 +35,7 @@ SSHTransport.prototype.__exec = function(cmd, args, options) {
cmd = cmd + (args ? ' ' + args : '');

this.logger.command(cmd);
var execOpts = options.exec || this.config.exec || {};
var execOpts = options.exec || this.target.exec || {};
this.connection.exec(cmd, execOpts, function(err, stream) {
if(err) {
// TODO
Expand Down

0 comments on commit 8d8b904

Please sign in to comment.