test
This commit is contained in:
@@ -20,10 +20,6 @@ foreach(line IN LISTS ENV_LINES)
|
|||||||
continue()
|
continue()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Trim whitespace only for non-empty, non-comment lines
|
|
||||||
string(REGEX REPLACE "^[ \t]*" "" line "${line}")
|
|
||||||
string(REGEX REPLACE "[ \t]*$" "" line "${line}")
|
|
||||||
|
|
||||||
# Expect KEY=VALUE (allow spaces around '=')
|
# Expect KEY=VALUE (allow spaces around '=')
|
||||||
if(NOT line MATCHES "^[A-Za-z_][A-Za-z0-9_]*[ \t]*=[ \t]*")
|
if(NOT line MATCHES "^[A-Za-z_][A-Za-z0-9_]*[ \t]*=[ \t]*")
|
||||||
message(WARNING "Skipping invalid line in ${ENV_FILE}: '${line}'")
|
message(WARNING "Skipping invalid line in ${ENV_FILE}: '${line}'")
|
||||||
|
|||||||
Reference in New Issue
Block a user