Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp task finishes but process never ends #63

Open
johannes-z opened this issue Nov 21, 2018 · 10 comments
Open

Gulp task finishes but process never ends #63

johannes-z opened this issue Nov 21, 2018 · 10 comments

Comments

@johannes-z
Copy link

johannes-z commented Nov 21, 2018

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>
@kschoi
Copy link

kschoi commented Dec 12, 2018

same issue!

@tonysamperi
Copy link

tonysamperi commented Jan 30, 2019

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.

@johannes-z
Copy link
Author

@Freyskeyd Hi! Just checking if you're still working on this package?

@tonysamperi
Copy link

tonysamperi commented Jan 30, 2019

@johannes-z if I can help, I solved switching to this

https://www.npmjs.com/package/readline-sync

@hooray
Copy link

hooray commented Jan 30, 2019

same issue too!

@shannonlal
Copy link
Collaborator

@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.

@hooray
Copy link

hooray commented Apr 3, 2019

@shannonlal it should still exist, I haven't seen it updated in the last two months.

@shannonlal
Copy link
Collaborator

@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$ 

@tonysamperi
Copy link

@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

@keyiis
Copy link

keyiis commented Feb 18, 2020

same issue too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants