Skip to main content

invoked_through_sudo

Function invoked_through_sudo 

Source
pub fn invoked_through_sudo() -> Option<String>
Expand description

Whether the current process is already root, in which case sudo is unnecessary (and may not even be installed). The user who ran this process through sudo, when it is running as root on their behalf rather than as a genuine root login.