Permalink
Browse files

modified: lib/client.js

  • Loading branch information...
1 parent 45f7b85 commit 25d266e05ede99e1bbe5a51275f7bfb693dc2980 @Kehao committed Dec 18, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/client.js
View
@@ -46,9 +46,9 @@ Client.prototype.parse = function(remote) {
Client.prototype.exec = function(command,callback) {
var remote = _.defaults(this.remote, this._options);
- if(remote.path){
+ if(remote.path)
command = ["cd " + remote.path,"&&",command].join(" ");
- }
+
if (this.__ssh) {
this.__ssh.connect(remote);
@@ -60,7 +60,6 @@ Client.prototype.exec = function(command,callback) {
self.emit('connect');
});
var commandHandler = function(command) {
- var next = false;
var streamHandler = function(err, stream) {
if (err) callback(err);

0 comments on commit 25d266e

Please sign in to comment.