[00:45:53] Using gulpfile D:\Projects\_kud\kud.github.io\gulpfile.js
[00:45:53] Starting 'server'...
[00:45:53] Running server on: http://localhost:3000
[00:45:53] Finished 'server' after 41 ms
[00:45:53] Starting 'clean'...
[00:45:53] Finished 'clean' after 38 ms
[00:45:53] Starting 'static'...
[00:45:53] Starting 'images'...
[00:45:53] Starting 'validate'...
[00:45:53] Starting 'styles'...
[00:45:54] Finished 'validate' after 950 ms
[00:45:54] Starting 'scripts'...
[00:45:55] Finished 'styles' after 1.41 s
[00:45:55] Finished 'scripts' after 930 ms
[00:45:55] Finished 'static' after 2.21 s
[00:45:55] gulp-imagemin: Minified 6 images (saved 487.55 kB - 5.3%)
[00:45:55] Finished 'images' after 2.59 s
[00:45:55] Starting 'compile'...
[00:45:55] Finished 'compile' after 5.36 渭s
[00:45:55] Starting 'watch'...
[00:45:55] Finished 'watch' after 119 ms
^CTerminate batch job (Y/N)? ^CTerminate batch job (Y/N)?
D:\Projects\_kud\kud.github.io (sources)
位 git st
Terminate batch job (Y/N)?
Everytime I quit the watch mode in gulp, it makes me stuck on Terminate batch job (Y/N) and I can't do anything more. Do you know why?
You can modify the settings file: config/settings
terminate_autoanswer = 2
I've set it as 1. Why 2?
You've got it set correctly, setting it to 1 auto-answers yes, but 2 auto-answers no.
Without seeing the gulp file there's no way I can help you with this, perhaps check how your gulpfile is starting the watch process, if it starts it in an extra cmd.exe it will auto answer this first cmd.exe but fail on the second one.
Okay thank you I will check this. ;)
For information: https://github.com/kud/kud.github.io/blob/sources/gulpfile.js#L30-L66
try running gulp like gulp watch < nul or use PowerShell :sunglasses:
Interesting, thanks. Why PowerShell? I don't mind using it but why it could solve my problem?
You'll avoid the terminate batch job (Y/N)? prompts altogether. It's newer, and much more user friendly. The problem is Microsoft never updates it on your machine through windows update, so you can install the latest "stable" version here: https://www.microsoft.com/en-gb/download/details.aspx?id=40855
Okay thank you. :) I'll check all these things when I'll be back on my windows.
Okay I've tried with PowerShell and I've got the same problem.
The only difference is that the shell isn't stuck but on every command I type it gives me terminate batch job (Y/N)? so in fact I can't use the shell anymore too. Even if I choose Y or N.
It seems that I can't quit easily a gulp watch via ctrl+c.
Works like a charm.
[23:57:31] Starting 'compile'...
[23:57:31] Finished 'compile' after 20 渭s
[23:57:31] Starting 'watch'...
[23:57:31] Finished 'watch' after 9.48 ms
[23:58:52] '^C', exiting
D:\Projects\_kud\diary (feat.reorganise)
位
Duplicate of: #1666.
Here's the write-up for future visitors:
https://github.com/cmderdev/cmder/wiki/Customization#terminate-batch-job-yn