Answer the question
In order to leave comments, you need to log in
How can I set a command to be executed in a BAT file if the user enters y?
You want the yarn init command to create index.html and ask you if you want to install bourbon. Interested in the question of how to offer the user the installation of bourbon (or another package).
Answer the question
In order to leave comments, you need to log in
The command
is good for entering text (and requires pressing enter at the end).
Here's a simple confirmation:
choice /t 5 /d N /m "Would you like to install ... package?"
if errorlevel 2 goto sub noinstall
if errorlevel 1 goto sub install
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question