Adding extra_scripts breaks project configuration


For some reason adding extra_script into my platformio.ini file causes project configuration to never end. The popup keeps showing that configuration is in progess. Below are my platformio.ini file & the screenshot for the popup.

; PlatformIO Project Configuration File
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Please visit documentation for the other options and examples
; Redirecting...

platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 115200
monitor_raw = yes
test_framework = unity
lib_deps =
me-no-dev/ESP Async WebServer@^1.2.3
build_flags = -I include
extra_scripts =

So what is the content of that script?

Here it is:


print("Building for release/production (yes): ")

input_env = input()

env.Append(BUILD_FLAGS=[“-D PROD” if input_env in [“yes”, “y”] else “-D DEV”])

Ok I found the issue. I missed the below statements which are supposed to be added when reading input as per [Asking for input (prompts) — PlatformIO latest documentation](Asking for input).

if env.IsIntegrationDump():
# stop the current script execution

It works now. Thanks!