Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-06-10 11:53:43 +0200
committerGitHub <noreply@github.com>2021-06-10 11:53:43 +0200
commit14aeb3b177dad2031cc4ec0d95d5e5d825a15014 (patch)
tree4ecdf7243f5b38c26d6455cd78a3dc7479ee57fe /archinstall
parent4572a41159aa187e16fccd8d98b7b5043cc284e0 (diff)
parenta8dda0716970d6ba9d5bef2cb8b0f4b0ad9fde57 (diff)
Merge pull request #562 from dylanmtaylor/hide-requires-root-if-root
Only print requires root messages if effective user id is not root
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/networking.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 0643c9cf..2c261334 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -32,7 +32,8 @@ def check_mirror_reachable():
if (exit_code := SysCommand("pacman -Sy").exit_code) == 0:
return True
elif exit_code == 256:
- log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red")
+ if os.geteuid() != 0:
+ log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red")
return False