microsoft / microsoft/react-native-windows
Add `--prompt` flag to scripts that can be used from CI environment and still prompt
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Proposal: Add --prompt flag to scripts that can be used from CI environment and still prompt
Summary
In PR #5603 @asklar validly pointed out that we have a user prompt in one of our scripts that is used in our CI.
It is generally bad practice to prompt from scripts that can run unattended like this particular script.
The answer is to add a flag .
Since you use yargs, adding a boolean flag called prompt with default true would suffice. Thanks go to @NickGerleman
for his explanation in the linked PR.
When a prompt is encountered and that flag is false, the script should error out to avoid hanging.
Motivation
Make automations using the react-native-windows scripts more robust.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the react-native-windows scripts that use yargs and can prompt, then inspect how their existing arguments and prompt path are tested. Add the boolean prompt option with default true, ensure a prompt attempt errors when it is false, and verify the scripts no longer hang in CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- ci-cd, cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100