Closed wss-git closed 1 year ago
Do you mean that you want to make the 2 prompts operable at the same time and move cursor between them with up/down arrow keys?
If so, such a feature is not supported at least at the moment as far as I know.
By the way, generally, it is supposed to be that only one prompt is used at a time.
I'm no so sure how it happens but the prompt executed first seems to be answered as "yes" because the next prompt is executed and have a control on user input (note: "Yes" is default answer when initialValue
option is not provided to a confirm prompt).
This happens because you use Promise.all()
that awaits promises parallelly.
You should sequentially await confirm prompt promises.
const { consola } = require("consola");
(async () => {
await a()
await b()
})()
async function a() {
await consola.prompt("Deploy to the production?", {
type: "confirm",
});
}
async function b() {
await consola.prompt("bbbbbb?", {
type: "confirm",
});
}
e... It seems that our project is not very suitable for this thing anymore, we have such a scenario. Thank you for your reply
Describe the feature
inoperable ‘Deploy to the production ’
Additional information