teambition / gulp-ssh

SSH and SFTP tasks for gulp
184 stars 38 forks source link

exec cd don`t work #13

Closed pdarscht closed 9 years ago

pdarscht commented 9 years ago

running this example:

gulp.task('test2', function () {
  return gulpSSH
    .exec(['date','hostname', 'cd /opt/app/', 'pwd', 'ls -a'],
             {filePath: 'commands.log'})
    .pipe(gulp.dest('logs'));
});

leaves in the log:

Fri Mar 20 15:12:35 UTC 2015
s21
/home/operador
.
..
.bash_history
.bash_logout
.bash_profile
.bashrc

that means, that everything works fine unless the "change directory" command. Can you help me?

zensh commented 9 years ago

https://github.com/teambition/gulp-ssh/issues/4

pdarscht commented 9 years ago

excuse me, I can´t understand your point... is it a bug or am I doing something wrong?

zensh commented 9 years ago

use shell instead of exec