From cdf5e68a09cf1b6ea10473e80d4da594836273d7 Mon Sep 17 00:00:00 2001 From: Michal Date: Mon, 25 Jul 2022 00:45:38 +0100 Subject: [PATCH] Made geteuid test windows only --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 445f459..8bc5eb7 100755 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ mod operations; mod repository; fn main() { + #[cfg(target_os = "linux")] 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"); }