Rollup merge of #93737 - mfrw:mfrw/bootstrap-config, r=Mark-Simulacrum

bootstrap: prefer using '--config' over 'RUST_BOOTSTRAP_CONFIG'

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

Closes: #93725
Rleated: #92260
This commit is contained in:
Mara Bos 2022-02-07 14:08:40 +00:00 committed by GitHub
commit a6c48108ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1221,9 +1221,9 @@ def bootstrap(help_triggered):
build.verbose = args.verbose
build.clean = args.clean
# Read from `RUST_BOOTSTRAP_CONFIG`, then `--config`, then fallback to `config.toml` (if it
# Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then fallback to `config.toml` (if it
# exists).
toml_path = os.getenv('RUST_BOOTSTRAP_CONFIG') or args.config
toml_path = args.config or os.getenv('RUST_BOOTSTRAP_CONFIG')
if not toml_path and os.path.exists('config.toml'):
toml_path = 'config.toml'