From 311e10f91e825348df97c0701f575f2b42260b57 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 24 Jun 2021 16:00:13 +0300 Subject: [PATCH] Ensure all patterns are replaces in debug init script --- platformio/debug/config/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platformio/debug/config/base.py b/platformio/debug/config/base.py index 019f9edb..65ceba60 100644 --- a/platformio/debug/config/base.py +++ b/platformio/debug/config/base.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import os from platformio import fs, proc, util @@ -238,4 +239,8 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes elif isinstance(value, (list, dict)) and recursive: source[key] = self.reveal_patterns(value, patterns) + data = json.dumps(source) + if any(("$" + key) in data for key in patterns): + source = self.reveal_patterns(source, patterns) + return source