Merge pull request #503 from archlinux/torxed-fix-116

Added in a are-we-root check at the top of guided.
This commit is contained in:
Anton Hvornum 2021-05-22 19:39:03 +02:00 committed by GitHub
commit e5c8a18752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

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