Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-22 19:39:03 +0200
committerGitHub <noreply@github.com>2021-05-22 19:39:03 +0200
commite5c8a187522e89bf0b21cddff32ecb56b8d99ca1 (patch)
tree20436075bf807686d5ffb3e58a797e6245a2e7b8 /examples
parent845ea481aa206c488652979a03d5b880cf350e77 (diff)
parentf789a96348472ae4bfe6277d107cbc3405eba5b2 (diff)
Merge pull request #503 from archlinux/torxed-fix-116
Added in a are-we-root check at the top of guided.
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py3
1 files changed, 3 insertions, 0 deletions
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)