thrashr888/grunt-sftp-deploy

When calling an sftp-deploy task as part of a task, the task just ends after the first sftp-deploy

soupdiver opened this issue · 8 comments

Hey,
I created the following task: grunt.registerTask('sftptest', ['sftp-deploy:server-staging', 'sftp-deploy:client-staging']);
But the sftptest ALWAYS finishes after the first 'sftp-deploy' task. I also spotted this in other scenarios. Why isn't the second sftp-deploy task executed after the first one?

To be honest, I never tried that. I'm pretty sure that works for the original grunt-ftp-deploy project at https://github.com/zonak/grunt-ftp-deploy/blob/master/tasks/ftp-deploy.js . I'll have to look into it.

Hi,

I looked into this, and done(); has to be added after line 254 to complete the async task.

async.forEachSeries(locations, sftpProcessLocation, function() {
log.ok('Uploads done.');
sftp.end();
done();
});

Ok the task now finishes but when a second sftp-deploy is started my script hangs at "Loggin in with username...."
Running the tasks manually one by one all sftp-deploy tasks work well

@soupdiver I tried running 2 sftp-deploy tasks, and found no problems

i merged the pull request. is this working for you guys now?

I'll work on getting myself a test case so I can make sure I'm not breaking things for you guys. In the meantime, I'll accept any PR that gets ssh2 2.x working. I'd prefer to use ssh2 2.x, if possible.

@timamai seems to have fixed this.