-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(config): move all uses of
clap(env)
to config (#9113)
### Description In an effort to get us where we're able to identify if there are multiple copies of run args* present this PR moves uses of `clap(env)` to `config/env.rs`. This also prepares us if we want to add some of these options to `turbo.json`. Each commit of this PR should be reviewed on it's own. The first chunk of this PR is some refactors to the config setup to reduce the copy-pasta of adding more env vars. **Explanation of `clap(env)` issue** Env vars being parsed at the CLI level results in problems for us as `TURBO_LOG_ORDER=grouped turbo run build --log-order stream` is totally valid command where we should stream logs, but it will result in `args.execution_args.log_order = LogOrder::Grouped` and `args.command.execution_args.log_order = LogOrder::Stream` and we can't tell if this is from env var usage or if the user typed `turbo --log-order=grouped run build --log-order=stream`. ### Testing Instructions Existing unit tests. Manually checking all of the changed flags/env vars e.g. ``` turbo build --filter=@turbo/types --flag FLAG=true turbo build --filter=@turbo/types ```
- Loading branch information
1 parent
b7a00d3
commit bb8f81e
Showing
8 changed files
with
249 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.