mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-01 17:56:12 +00:00
fix(build): tolerate control chars in pio project config JSON dump
get_platform_for_env() in build.sh parses `pio project config --json-output` with Python's strict json.load(), which rejects literal control characters inside string values. Depending on the installed pio version, a build_flags value can embed one there, breaking env-name lookup with "Invalid control character" before the actual build even starts. strict=False accepts it, same as a lenient JSON consumer would for a non-conforming producer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4999620fba
commit
e7e910782c
@@ -96,7 +96,7 @@ get_platform_for_env() {
|
||||
local env_name=$1
|
||||
echo "$PIO_CONFIG_JSON" | python3 -c "
|
||||
import sys, json, re
|
||||
data = json.load(sys.stdin)
|
||||
data = json.load(sys.stdin, strict=False)
|
||||
for section, options in data:
|
||||
if section == 'env:$env_name':
|
||||
for key, value in options:
|
||||
|
||||
Reference in New Issue
Block a user