~goorzhel/radm

709d891ef23a977a8d5bcc88b8b2937310d3767a — Antonio Gurgel 3 months ago 7d13eff
Add LANG and LC_ALL to allowed env vars
1 files changed, 7 insertions(+), 1 deletions(-)

M src/user.rs
M src/user.rs => src/user.rs +7 -1
@@ 47,7 47,13 @@ impl FromStr for User {
}

/// Environment variables to load from the authenticated user's environment.
const USEFUL_ENV_VARS: &[&str] = &["XDG_RUNTIME_DIR", "XDG_CACHE_HOME", "XDG_STATE_HOME"];
const USEFUL_ENV_VARS: &[&str] = &[
    "LANG",
    "LC_ALL",
    "XDG_RUNTIME_DIR",
    "XDG_CACHE_HOME",
    "XDG_STATE_HOME",
];

// Many of these function take `xdg: &BaseDirectories` as an argument because
// `User`s are instantiated before their environments have been loaded, and