Remove spaces from value which were read from *_network_config

MDBCI can put spaces around values in the *_network_config file which
can cause ssh connection failures in the tests. To fix it removing all
spaces from all values which were read from *_network_config
This commit is contained in:
Timofey Turenko
2019-11-19 11:52:33 +02:00
parent 87aa3edb95
commit 5e4d556c85

View File

@ -421,6 +421,7 @@ std::string Nodes::get_nc_item(const char* item_name)
} }
std::string str = network_config.substr(equal + 1, end - equal - 1); std::string str = network_config.substr(equal + 1, end - equal - 1);
str.erase(remove(str.begin(), str.end(), ' '), str.end());
setenv(item_name, str.c_str(), 1); setenv(item_name, str.c_str(), 1);