summaryrefslogtreecommitdiff
path: root/src/frontend/cli
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-18 12:26:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-18 12:26:10 +0100
commita71ffe9cd09164182584bb01b3993881f7766dfd (patch)
tree3131c0ac94300b27d5983249f54769ec95a89689 /src/frontend/cli
parentf28b67f3d6910f71e20da86367205f3c3660ff72 (diff)
make sisyphus.check.root more portable, replace it everywhere
Diffstat (limited to 'src/frontend/cli')
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index 33a2233..61a5d82 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -177,7 +177,10 @@ def autoremove():
@app.command("update")
def update():
"""Update the Portage tree, the Redcore Overlay(s), Portage configs and Sisyphus's package database."""
- sisyphus.update.start()
+ if sisyphus.check.root() == 0:
+ sisyphus.update.start()
+ else:
+ sys.exit("\nYou need root permissions to do this, exiting!\n")
@app.command("upgrade")
def upgrade(ebuild: bool = typer.Option(False, "--ebuild", "-e")):