Gulp task finishes but process never ends
Opened this issue · 10 comments
I've tried a simple example with gulp-prompt
. The task finishes, but the process never exits. Actually, I can't even ctrl+c in the terminal anymore... It's working fine with prompt.confirm
. It's basically the same behaviour as in #24. According to some gulp
issues, this is related with a process not ending... gulpjs/gulp#903 (comment)
"gulp": "^4.0.0",
"gulp-prompt": "^1.1.0",
gulp.task('test', done => {
return gulp.src('./package.json')
.pipe(prompt.prompt({
type: 'list',
name: 'name',
message: 'Select Choice:',
choices: ['1', '2'],
pageSize: '10',
}))
I even tried one of the samples:
const gulp = require('gulp')
const prompt = require('gulp-prompt')
gulp.task('getSelection', done => {
gulp.src('./settings.js')
.pipe(prompt.prompt({
type: 'list',
name: 'env',
message: 'Please enter selection?',
choices: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
pageSize: '3',
}, (res) => {
console.log('Result', res)
return done()
}))
})
Output:
$ gulp getSelection
[14:50:20] Using gulpfile ~\tmp\gulpfile.js
[14:50:20] Starting 'getSelection'...
? Please enter selection? b
Result { env: 'b' }
[14:50:23] Finished 'getSelection' after 3.24 s
<TERMINAL HANGS>
same issue!
Same here with
Gulp 3.9.1
Node 10.14.2
Npm 6.4.1
If I run the script in debug mode, it ends succesfully.
Don't know why it doesn't otherwise.
@Freyskeyd Hi! Just checking if you're still working on this package?
@johannes-z if I can help, I solved switching to this
same issue too!
@johannes-z and @hooray is this still an issue? I can have a look at this over the weekend if you are still seeing the issue.
@shannonlal it should still exist, I haven't seen it updated in the last two months.
@hooray @tonysamperi @johannes-z can you provide some more information about the operating system? I just ran this on my Mac a didn't have any issues:
Shannons-MBP:gulp-prompt-test shannonlal$ node_modules/.bin/gulp getSelection
[16:17:46] Using gulpfile ./gulpfile.js
[16:17:47] Starting 'getSelection'...
? Please enter selection? d
Result { env: 'd' }
[16:17:55] Finished 'getSelection' after 8.12 s
Shannons-MBP:gulp-prompt-test shannonlal$
@hooray @tonysamperi @johannes-z can you provide some more information about the operating system? I just ran this on my Mac a didn't have any issues:
Shannons-MBP:gulp-prompt-test shannonlal$ node_modules/.bin/gulp getSelection [16:17:46] Using gulpfile ./gulpfile.js [16:17:47] Starting 'getSelection'... ? Please enter selection? d Result { env: 'd' } [16:17:55] Finished 'getSelection' after 8.12 s Shannons-MBP:gulp-prompt-test shannonlal$
I'm using Node 8.11.4 (NPM 5.6.0) on Windows 10 64 bit
same issue too!