Skip to content

Commit 311e10f

Browse files
committed
Ensure all patterns are replaces in debug init script
1 parent 2b94791 commit 311e10f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

platformio/debug/config/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import json
1516
import os
1617

1718
from platformio import fs, proc, util
@@ -238,4 +239,8 @@ def _replace(text):
238239
elif isinstance(value, (list, dict)) and recursive:
239240
source[key] = self.reveal_patterns(value, patterns)
240241

242+
data = json.dumps(source)
243+
if any(("$" + key) in data for key in patterns):
244+
source = self.reveal_patterns(source, patterns)
245+
241246
return source

0 commit comments

Comments
 (0)