Can’t use “(” character in a sysenv variable

Author: lulu731Created Apr 9, 2026Updated Sep 5, 2026
Labelshelp wantedbuild system

Hello, I am on Debian. My wifi SSID password has a “(“ character. Password included thanks to a build flag. The only way I can compile is using : build_flags = -D’SSID = ‘${sysenv.WIFI_SSID} -D’PASSWD = ‘${sysenv.WIFI_PASSWD} with export WIFI_PASSWD=’"MYPASS(WORD"’ (see the way I use the character), instead of : build_flags = -DSSID=${sysenv.WIFI_SSID} -DPASSWD=${sysenv.WIFI_PASSWD} which gives an error :

“Building in release mode Compiling .pio/build/esp32-s3-devkitc-1/src/main.c.o sh: 1: Syntax error: “(” unexpected Generating LD script .pio/build/esp32-s3-devkitc-1/esp-idf/esp_system/ld/memory.ld.in *** [.pio/build/esp32-s3-devkitc-1/src/main.c.o] Error 2”

Even escaping the character ( does not work, according to https://docs.platformio.org/en/latest/projectconf/interpolation.html Ex : export WIFI_PASSWD='\"MYPASS\(WORD\"'

Source: platformio/platformio-core