facebookexperimental/object-introspection

Test cases with a `config` section may fail with a relative config

Closed this issue · 0 comments

The config section causes a new config to be created in a different temporary location (

fs::path customConfigFile = configFile;
if (!extra_config.empty()) {
customConfigFile = workingDir / "oid.config.toml";
fs::copy_file(configFile, customConfigFile);
std::ofstream customConfig(customConfigFile, std::ios_base::app);
customConfig << "\n\n# Test custom config\n\n";
customConfig << extra_config;
}
). Now that the config file can contain relative paths this may break it.

Possibly the easiest solution to this is to canonicalise the paths in the base config first, allowing it to be moved anywhere after.