Cleanup, prep for editor
Some checks failed
Build Dusk / build-linux (push) Failing after 40s
Build Dusk / build-psp (push) Failing after 1m7s

This commit is contained in:
2025-11-15 22:21:03 -06:00
parent 7278bd0c6f
commit c53439066e
17 changed files with 132 additions and 131 deletions

View File

@@ -24,8 +24,8 @@ foreach(line IN LISTS ENV_LINES)
continue()
endif()
# Expect KEY=VALUE
if(NOT line MATCHES "^[A-Za-z_][A-Za-z0-9_]*=")
# Expect KEY=VALUE (allow spaces around '=')
if(NOT line MATCHES "^[A-Za-z_][A-Za-z0-9_]*[ \t]*=[ \t]*")
message(WARNING "Skipping invalid line in ${ENV_FILE}: '${line}'")
continue()
endif()
@@ -34,9 +34,8 @@ foreach(line IN LISTS ENV_LINES)
string(REGEX MATCH "^[A-Za-z_][A-Za-z0-9_]*" KEY "${line}")
string(LENGTH "${KEY}" key_len)
# Extract value
string(SUBSTRING "${line}" ${key_len} -1 rest)
string(REGEX REPLACE "^[ \t]*=[ \t]*" "" RAW_VALUE "${rest}")
# Extract value (allow spaces around '=')
string(REGEX REPLACE "^[A-Za-z_][A-Za-z0-9_]*[ \t]*=[ \t]*" "" RAW_VALUE "${line}")
# Lowercase copy for boolean detection
string(TOLOWER "${RAW_VALUE}" VALUE_LC)