Skip to main content

select_profile

Function select_profile 

Source
pub fn select_profile(
    flag: Option<&str>,
    no_profile: bool,
    persisted: Option<&str>,
) -> Option<String>
Expand description

Chooses the active profile from a caller’s override and the persisted selection. Pure, so the precedence is testable without touching disk.

An explicit flag wins. no_profile opts out of a persisted selection. Otherwise the persisted selection applies, and its absence means game-directory mode.