From f789a96348472ae4bfe6277d107cbc3405eba5b2 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 22 May 2021 19:35:57 +0200 Subject: Added in a are-we-root check at the top of guided. --- examples/guided.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index f61548e1..c5440efe 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -12,6 +12,9 @@ from archinstall.lib.profiles import Profile if archinstall.arguments.get('help'): print("See `man archinstall` for help.") exit(0) +if os.getuid() != 0: + print("Archinstall requires root privileges to run. See --help for more.") + exit(1) # For support reasons, we'll log the disk layout pre installation to match against post-installation layout archinstall.log(f"Disk states before installing: {archinstall.disk_layouts()}", level=logging.DEBUG) -- cgit v1.2.3-70-g09d2