Starting to work
This commit is contained in:
parent
aeaf57e196
commit
8d2a66ee49
@ -44,7 +44,17 @@ server_env_manager::server_env_manager(const std::string& server_name) : mValid(
|
||||
|
||||
// get the variables from the json
|
||||
for (const auto& var : server_env_json.items()) {
|
||||
mVariables[var.key()] = replace_with_environment_variables_like_bash(var.value());
|
||||
std::string value;
|
||||
if (var.value().is_string())
|
||||
value = var.value();
|
||||
else if (var.value().is_number_integer())
|
||||
value = std::to_string(var.value().get<int>());
|
||||
else if (var.value().is_boolean())
|
||||
value = var.value() ? "true" : "false";
|
||||
else
|
||||
value = var.value().dump();
|
||||
|
||||
mVariables[var.key()] = replace_with_environment_variables_like_bash(value);
|
||||
}
|
||||
|
||||
// Verify required variables exist
|
||||
|
Loading…
x
Reference in New Issue
Block a user