Skip to main content

get_current_user

Function get_current_user 

Source
pub fn get_current_user() -> String
Expand description

Returns the current username from the environment.

Reads USER, falling back to USERNAME (Windows), and finally to the literal "unknown" if neither is set.