From d8552e33448391d90a0275a013db3b23d8da8b39 Mon Sep 17 00:00:00 2001 From: mikecarper Date: Mon, 20 Apr 2026 14:06:39 -0700 Subject: [PATCH] Better json arg passing in build.sh --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4b47220d..30b73b5f 100755 --- a/build.sh +++ b/build.sh @@ -495,7 +495,8 @@ get_platform_for_env() { # PlatformIO exposes project config as JSON; scan the selected env's # build_flags to recover the platform token used for artifact collection. - echo "$PIO_CONFIG_JSON" | python3 -c " + # Feed the cached JSON via stdin to avoid shell echo quirks and argv/env size limits. + python3 -c " import sys, json, re data = json.load(sys.stdin) for section, options in data: @@ -507,7 +508,7 @@ for section, options in data: if match: print(match.group(1)) sys.exit(0) -" +" <<<"$PIO_CONFIG_JSON" } is_supported_platform() {