Plattformio.ini extra_scripts appending not working as expected?

[env]
extra_scripts =
  do_basic_stuff.py
build_flags =
-D BASIC_DEFINE
  
  
[CONFIG_A]
extra_scripts =
  ${env:extra_scripts} 
  do_stuff_A.py
build_flags =
  ${env:build_flags} 
  -D DEFINE_A
  
[CONFIG_B]
extra_scripts =
  ${env:extra_scripts} 
  do_stuff_B.py
build_flags =
  ${env:build_flags} 
  -D DEFINE_B

I would expect that with that ini, that when buillding CONFIG_A, do_basic_stuff.py AND do_stuff_A.py are executed. And the same for B.

But it seems that appending this way does not work, do_basic_stuff.py is ignored.

I’m using this method for build_flags, there it works perfectly. DEFINE_BASIC IS actually defined.

Is this a bug or did I missunderstand something?

The docs use env.xxx, not env:xxx.

2 Likes