Abort or continue the flow of tasks according to an answer (with or without Enter key) to the specified question. The flow of tasks is paused, until the user responds and the next behavior is found by specified options.
If the tasks where aborted the process exit with code 0. How can i change that ?
This can be a problem if you have a external tool calling the script, it can't know if the process exit successfully or was aborted.
stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/readline-sync.js:250
if (res.error) { throw res.error; }
^
Error: The current environment doesn't support interactive reading from TTY.
stty: /dev/tty: Device not configured
<...>/node_modules/readline-sync/lib/read.sh: line 49: /dev/tty: Device not configured
stty: /dev/tty: Device not configured
at readlineExt (<...>/node_modules/readline-sync/lib/readline-sync.js:212:19)
at tryExt (<...>/node_modules/readline-sync/lib/readline-sync.js:249:15)
at <...>/node_modules/readline-sync/lib/readline-sync.js:352:15
at _readlineSync (<...>/node_modules/readline-sync/lib/readline-sync.js:422:5)
at Object.exports.keyIn (<...>/node_modules/readline-sync/lib/readline-sync.js:877:17)
at Confirm.transform (<...>/node_modules/gulp-confirm/index.js:75:34)
at DestroyableTransform._transform (<...>/node_modules/gulp-confirm/index.js:33:57)
at DestroyableTransform.Transform._read (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:182:10)
at DestroyableTransform.Transform._write (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:170:83)
at doWrite (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:406:64)
at writeOrBuffer (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:395:5)
at DestroyableTransform.Writable.write (<...>/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:322:11)
at write (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (<...>/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:664:5)
at emitNone (events.js:86:13)
i'm using this in a gulp task, it work on the windows powershell but skips on git bash for windows. No errors displayed. I guess the confirm method is not triggered at all.