test
This commit is contained in:
1 parent
7b9f8b190e
commit
8525138594
1 file changed
-4
@@ -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