mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 10:37:13 +02:00
Raise an error when invalid environment name was set for env_default
option
This commit is contained in:
@ -71,14 +71,14 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose,
|
|||||||
fg="yellow")
|
fg="yellow")
|
||||||
|
|
||||||
config = util.load_project_config()
|
config = util.load_project_config()
|
||||||
check_project_defopts(config)
|
|
||||||
assert check_project_envs(config, environment)
|
|
||||||
|
|
||||||
env_default = None
|
env_default = None
|
||||||
if config.has_option("platformio", "env_default"):
|
if config.has_option("platformio", "env_default"):
|
||||||
env_default = util.parse_conf_multi_values(
|
env_default = util.parse_conf_multi_values(
|
||||||
config.get("platformio", "env_default"))
|
config.get("platformio", "env_default"))
|
||||||
|
|
||||||
|
check_project_defopts(config)
|
||||||
|
check_project_envs(config, environment or env_default)
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
start_time = time()
|
start_time = time()
|
||||||
for section in config.sections():
|
for section in config.sections():
|
||||||
|
Reference in New Issue
Block a user