pub fn resolve_env_file(
explicit: Option<&Path>,
no_env_file: bool,
dir: &Path,
) -> CliResult<Option<PathBuf>>Expand description
Resolve the .env file to load (if any). Precedence:
- If
no_env_fileis set, returnOk(None). - If
explicitisSome(path), the file must exist — otherwise error. - Otherwise, return
Some(dir/.env)if it exists, elseNone.