Made geteuid test windows only

main
Michal 2 years ago
parent dae3562752
commit cdf5e68a09

@ -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