uninstall command is done

This commit is contained in:
2026-01-19 07:03:51 +11:00
parent dd204788e3
commit 28b56e71ab
5 changed files with 69 additions and 11 deletions

16
src/util.py Normal file
View File

@@ -0,0 +1,16 @@
import os, sys
from rich import print
def check_ground_libs_path():
# ensure the GROUND_LIBS var is set
if not os.getenv("GROUND_LIBS"):
print("digpkg: the [i]GROUND_LIBS[/] environment variable is not set, defaulting to /usr/lib/ground/")
os.environ["GROUND_LIBS"] = "/usr/lib/ground/"
def check_sudo():
# check if we are sudo
if os.getuid() != 0:
print("[b red]digpkg: that command requires sudo to run[/]")
sys.exit(1)