mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Check simultaneous use of monitor_raw
and monitor_filters
This commit is contained in:
@ -401,11 +401,22 @@ class ProjectConfigBase:
|
||||
", ".join(unknown_envs), ", ".join(known_envs)
|
||||
)
|
||||
|
||||
# check envs names
|
||||
for env in known_envs:
|
||||
# check envs names
|
||||
if not self.ENVNAME_RE.match(env):
|
||||
raise exception.InvalidEnvNameError(env)
|
||||
|
||||
# check simultaneous use of `monitor_raw` and `monitor_filters`
|
||||
if self.get(f"env:{env}", "monitor_raw", False) and self.get(
|
||||
f"env:{env}", "monitor_filters", None
|
||||
):
|
||||
self.warnings.append(
|
||||
"The `monitor_raw` and `monitor_filters` options cannot be "
|
||||
f"used simultaneously for the `{env}` environment in the "
|
||||
"`platformio.ini` file. The `monitor_filters` option will "
|
||||
"be disabled to avoid conflicts."
|
||||
)
|
||||
|
||||
if not silent:
|
||||
for warning in self.warnings:
|
||||
click.secho("Warning! %s" % warning, fg="yellow")
|
||||
|
Reference in New Issue
Block a user