gulp-prompt
gulp-prompt copied to clipboard
gulp-prompt prevents use of sftp
When using gulp-prompt in a pipe to query a privatekey pasword before sending to gulp-ftp, sftp hangs (happens with all sftp clients I tried gulp-ftp, gulp-sftp-up5, gulp-ssh). (see ).
Use sample is : ` gulp.task('deploy-test', function () {
sftpOptions = { host: 'host', port: 22, remotePath: '/var/www/Test/', key: { location: "private.key", passphrase: '12345' }, buffer:false, username:"webuser",
}; res = gulp.src(['./.php', './dist/**/','./ws/**/*'],{base: './'}) .pipe(prompt.prompt({ type: 'password', name: 'pass', message: 'Please enter your password' }, function(res){ sftpOptions.key.passphrase=res.pass; })) .pipe(sftp(sftpOptions)); return res; });`
When doing so, the ftp will sort of start then hang. Removing the call to prompt and all works properly again. How is one supposed to call prompt for such a use case?