Quote possibly empty variable to avoid error message

On RedHat 6.4 workstation the module doesn't find the necessary system
information, and gives an error message when the last parameter to the
string function is not present.
This commit is contained in:
Lars Vingli Odsæter
2013-04-16 09:19:00 +02:00
committed by Roland Kaufmann
parent 92ee97274e
commit d2921faec8

View File

@@ -43,7 +43,7 @@ function (read_release valuename FROM filename INTO varname)
REGEX "^${valuename}="
)
string (REGEX REPLACE
"^${valuename}=\"?\(.*\)" "\\1" ${varname} ${_distrib}
"^${valuename}=\"?\(.*\)" "\\1" ${varname} "${_distrib}"
)
# remove trailing quote that got globbed by the wildcard (greedy match)
string (REGEX REPLACE