PlatformIO Community

[common] section extra_scripts always run?

In my platformio.ini I set up two environments, one for release [env:RELEASE] and one for debug [env:DEBUG]. In section [common], there are extra_scripts defined…

The release environment includes these scripts via the line extra_scripts = ${common.extra_scripts} and this works fine when default_env = RELEASE.

However in the debug environment extra_scripts does NOT reference the [common] section values but yet these scripts run anyway when default_env=DEBUG !

I would not expect those [common] scripts to run when using the DEBUG env.

Here’s the file:

[platformio]
default_envs = DEBUG

[common]
build_flags = 
    -fmax-errors=4
    -g3
    -ggdb
    -Wno-missing-braces
extra_scripts = 
    pre:buildroot/scripts/custom_filename.py       
    post:buildroot/scripts/short_out_filename.py

[env:RELEASE]
platform = ststm32@11.0.0
framework = cmsis
board = btt_tft35_v3
build_flags = 
    ${stm32f2xx.build_flags}
    -DSTM32F2XX=
    -DHSE_VALUE=8000000ul
    -DVECT_TAB_FLASH=0x08008000
    -DRAM_SIZE=48
extra_scripts = ${common.extra_scripts}     ; use scripts from [common]

[env:BIGTREE_TFT35_V3_0 DEBUG]
platform = ststm32@11.0.0
framework = cmsis
board = btt_tft35_v3
upload_protocol = stlink
build_flags = 
    ${stm32f2xx.build_flags}
    -DSTM32F2XX=
    -DHSE_VALUE=8000000ul
    -DVECT_TAB_FLASH=0x08008000
    -DRAM_SIZE=48
extra_scripts = 
    buildroot/scripts/stm32f2xx_0x8000_iap.py
build_type = debug
debug_tool = stlink

Anyone seen this behavior before?