turbo
bb8f81e6 - chore(config): move all uses of `clap(env)` to config (#9113)

Commit
1 year ago
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 ```
Parents
Loading