pub fn find_config(
flag: Option<&Path>,
env_var: &str,
basename: &str,
) -> Result<PathBuf>Expand description
Resolve the config file path through the fallback chain:
flag(e.g.--config <path>) — honored verbatim, even when the file does not exist (caller’s choice).env_varvalue (e.g.KANADE_AGENT_CONFIG) — honored verbatim when set to a non-empty string.- OS-standard location
<config_dir>/<basename>— only used when the file is actually present.
Returns an error when none of the above produced a usable path; the message lists every option an operator can take to fix it.