vorpal icon indicating copy to clipboard operation
vorpal copied to clipboard

UI Prompt called when already mid prompt

Open MatteoGabriele opened this issue 7 years ago • 1 comments

I've recently discovered this issue prompting an array of questions. It only happens after the first question and when ctrl + c is pressed to be able to go out the prompt.

.action(function (args, callback) {
  this.prompt([
    { ... }, // during this question is still possible to exist 
    { ... } // here pressing `ctrl + c` will cause the error
  ])
})

Error in the console

Error: UI Prompt called when already mid prompt.
    at UI.prompt (/web/blocklevel/blue-next/packages/bcli/node_modules/vorpal/dist/ui.js:209:15)
    at /web/blocklevel/blue-next/packages/bcli/node_modules/vorpal/dist/vorpal.js:571:19
    at Vorpal.vorpal.prompt (/web/blocklevel/blue-next/packages/bcli/node_modules/vorpal/dist/vorpal.js:546:10)
    at Session.session.prompt (/web/blocklevel/blue-next/packages/bcli/node_modules/vorpal/dist/session.js:132:22)
    at CommandInstance.prompt (/web/blocklevel/blue-next/packages/bcli/node_modules/vorpal/dist/command-instance.js:101:27)
    at pathExists.then.exists (/web/blocklevel/blue-next/packages/bcli/src/commands/_component.js:56:23)

OS: macOS Sierra node: 7.4.0 npm: 4.3.0 yarn: 0.21.3

MatteoGabriele avatar Mar 19 '17 15:03 MatteoGabriele