Merge pull request #8558 from jodh-intel/load-config-improvement

runtime-rs: Show config files attempted on config load failure
This commit is contained in:
James O. D. Hunt
2023-12-05 11:48:42 +00:00
committed by GitHub
3 changed files with 13 additions and 3 deletions

View File

@@ -216,6 +216,14 @@ impl TomlConfig {
Err(io::Error::from(io::ErrorKind::NotFound))
}
/// Return a list of default config file paths.
pub fn get_default_config_file_list() -> Vec<PathBuf> {
default::DEFAULT_RUNTIME_CONFIGURATIONS
.iter()
.map(|s| PathBuf::from(*s))
.collect()
}
}
/// Validate the `path` matches one of the pattern in `patterns`.