forked from platformio/platformio-core
Reset custom project config per command
This commit is contained in:
@ -168,6 +168,9 @@ def cli(
|
||||
elif not silent:
|
||||
print_check_summary(results)
|
||||
|
||||
# Reset custom project config
|
||||
app.set_session_var("custom_project_conf", None)
|
||||
|
||||
command_failed = any(r.get("succeeded") is False for r in results)
|
||||
if command_failed:
|
||||
raise exception.ReturnErrorCode(1)
|
||||
|
@ -92,6 +92,7 @@ def cli(
|
||||
|
||||
is_test_running = CTX_META_TEST_IS_RUNNING in ctx.meta
|
||||
|
||||
results = []
|
||||
with fs.cd(project_dir):
|
||||
config = ProjectConfig.get_instance(project_conf)
|
||||
config.validate(environment)
|
||||
@ -114,7 +115,6 @@ def cli(
|
||||
handle_legacy_libdeps(project_dir, config)
|
||||
|
||||
default_envs = config.default_envs()
|
||||
results = []
|
||||
for env in config.envs():
|
||||
skipenv = any(
|
||||
[
|
||||
@ -145,14 +145,17 @@ def cli(
|
||||
)
|
||||
)
|
||||
|
||||
command_failed = any(r.get("succeeded") is False for r in results)
|
||||
command_failed = any(r.get("succeeded") is False for r in results)
|
||||
|
||||
if not is_test_running and (command_failed or not silent) and len(results) > 1:
|
||||
print_processing_summary(results, verbose)
|
||||
if not is_test_running and (command_failed or not silent) and len(results) > 1:
|
||||
print_processing_summary(results, verbose)
|
||||
|
||||
if command_failed:
|
||||
raise exception.ReturnErrorCode(1)
|
||||
return True
|
||||
# Reset custom project config
|
||||
app.set_session_var("custom_project_conf", None)
|
||||
|
||||
if command_failed:
|
||||
raise exception.ReturnErrorCode(1)
|
||||
return True
|
||||
|
||||
|
||||
def process_env(
|
||||
|
@ -175,6 +175,9 @@ def cli( # pylint: disable=redefined-builtin
|
||||
|
||||
print_processing_footer(result)
|
||||
|
||||
# Reset custom project config
|
||||
app.set_session_var("custom_project_conf", None)
|
||||
|
||||
if without_testing:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user