Skip to main content

user_home

Function user_home 

Source
pub fn user_home() -> Option<PathBuf>
Expand description

Resolve the user’s platform home, preferring HOME before USERPROFILE.

The explicit environment order makes CLI, state, config, and secret paths deterministic in hermetic shells. On Windows, HOMEDRIVE plus HOMEPATH remains a compatibility fallback before the platform resolver. The platform resolver remains last for ordinary desktop launches without those variables.