Skip to main content

refresh_login_path_cache

Function refresh_login_path_cache 

Source
pub fn refresh_login_path_cache(
    cache_file: &Path,
    inherited: &str,
    current_enriched: &str,
) -> Option<String>
Expand description

Re-run the login shell and rewrite the cache that enrich_current_process_path_cached read. inherited is the PATH the process started with (before enrichment), so the fingerprint matches the next launch’s. Returns the freshly captured enriched PATH when it differs from current_enriched, None when nothing changed or the shell couldn’t be read. Never touches this process’ environment.