mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 20:54:34 +00:00
Print error if not root
This commit is contained in:
parent
4623175ea5
commit
7dc292d65a
|
@ -1,15 +1,14 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from src.packages import install_packages
|
||||
from src.util.user import Input, Print
|
||||
|
||||
|
||||
if os.geteuid() != 0:
|
||||
sys.exit("Please run this program as root user")
|
||||
|
||||
|
||||
def main():
|
||||
if os.geteuid() != 0:
|
||||
Print.err("You need to run this program as root user")
|
||||
return
|
||||
|
||||
if Input.yes_no("Do you wish to perform package install (from `packages.yaml`)?"):
|
||||
install_packages()
|
||||
|
||||
|
|
Loading…
Reference in a new issue