()
| 7 | }; |
| 8 | |
| 9 | pub fn is_root_user() -> bool { |
| 10 | #[cfg(unix)] |
| 11 | return nix::unistd::Uid::current().is_root(); |
| 12 | #[cfg(not(unix))] |
| 13 | return false; |
| 14 | } |
| 15 | |
| 16 | fn is_sudo_available() -> bool { |
| 17 | Command::new("sudo") |
no outgoing calls
no test coverage detected