Made geteuid test windows only

main
Michal 2 years ago
parent b2b2fff81d
commit de87bbf773
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -16,6 +16,7 @@ mod operations;
mod repository; mod repository;
fn main() { fn main() {
#[cfg(target_os = "linux")]
if unsafe { libc::geteuid() } == 0 { if unsafe { libc::geteuid() } == 0 {
crash!(AppExitCode::RunAsRoot, "Running malachite as root is disallowed as it can lead to system breakage. Instead, malachite will prompt you when it needs superuser permissions"); crash!(AppExitCode::RunAsRoot, "Running malachite as root is disallowed as it can lead to system breakage. Instead, malachite will prompt you when it needs superuser permissions");
} }

Loading…
Cancel
Save