pub fn load_env_for_mode(
manifest: Option<&Manifest>,
start_dir: &Path,
) -> Result<Option<PathBuf>>Expand description
Load environment variables from a .env file before any tool that
reads GITHUB_TOKEN / API credentials runs.
Resolution order:
- If the manifest sets
env_file:, load that path (error if missing). - Otherwise walk upward from
start_dirlooking for a.env.
Returns the path actually loaded (for boot-summary logging), or
None if nothing was found. Existing env vars are never overwritten.