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