GoogleChromeLabs / GoogleChromeLabs/bubblewrap

Make create config a command with -Y option

Open
#543 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
3.1k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Hello! I see good potential in a CI environment for the bubblewrap CLI. The [loadOrCreateConfig](https://github.com/GoogleChromeLabs/bubblewrap/blob/cbab77063ec1b364ef35e7cf1d66acf3b877f3b3/packages/cli/src/lib/config.ts#L93) is really amazing to have a repeatable JDK and android SDK installation on different kind of CI runners.

The only thing preventing it from being perfect is how it is invoked and the need for interactive outputs.

**Describe the solution you'd like**

- createConfig becomes available as a command
- adding a -y option automatically accepts all prompts (making easier to install all bubblewrap dependencies in CI without having to meddle in downloading manually the JDK for the runners)
- loadOrCreateConfig is not called automatically on each command, instead if no config is found commands error out asking user to run the new command.

**Describe alternatives you've considered**
I have a working hackish alternative. I spam the unix `yes` command and send standard output to /dev/null to avoid an unreadable CI output. looks like this paired with a doctor command:

```
yes | yarn workspace @auco/web bubblewrap:doctor &> /dev/null
```

**Additional context**
I would totally be open to submit a PR with tests if ever maintainers are open to the approach

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.