Closed imjamesb closed 1 month ago
Any news on this? Sometimes it's useful to present a Y/N question where only one answer is acceptable. Our use case is a commit prompt that asks a few things, among which are:
Answering "yes" to the second question is only acceptable if your answer to the first is "feature". We still want to ask the question, because we want to bomb out if someone tries to mark a breaking change commit as, say, a refactor, and tell them why, rather than just hiding the question with when
.
@itsravenous-sky couldn't you do this anyway? Split your prompts in 2 calls to prompt()
, then check if the values are valid and allows you to move forward with the second set of questions.
I am currently trying to validate the response given from a confirm question. My process is running a lot of other code that will use memory and cpu, and at the same time it's running the CLI, sort of like a PERL interpreter, just with code running in the background. It's like a tool that interacts with GitHub and other stuff. And I don't want to split the questions into two sections, but rather validate every thing at per question.
I tried replacing
validate
withconsole.log(n)
(validate: console.log(n)
), but it didn't output anything, just hopped over to next question.P.S.:
Miners
isn't crypto miners, but info miners, they collect data from GitHub, Discord and some other social medias.