mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
config: fix invalid usage of std::string::replace()
This commit is contained in:
parent
8df9bce692
commit
9b3d08ab6a
1 changed files with 2 additions and 2 deletions
|
@ -218,9 +218,9 @@ void Config::expandEnvVars()
|
|||
while (std::regex_search(text, match, env_re)) {
|
||||
auto const from = match[0];
|
||||
auto const var_name = match[1].str().c_str();
|
||||
char * var_value = std::getenv(var_name);
|
||||
char *var_value = std::getenv(var_name);
|
||||
|
||||
text.replace(from.first, from.second, var_value);
|
||||
text.replace(from.first - text.begin(), from.second - from.first, var_value);
|
||||
|
||||
logger->debug("Replace env var {} in \"{}\" with value \"{}\"",
|
||||
var_name, text, var_value);
|
||||
|
|
Loading…
Add table
Reference in a new issue