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

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
Muhammad Falak R Wani 2022-02-07 18:22:08 +05:30
parent 926e7843ea
commit 95054de501
No known key found for this signature in database
GPG Key ID: D323A5E0174C86DD

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'