Skip to content

Commit

Permalink
error exit if no superuser cmd found
Browse files Browse the repository at this point in the history
  • Loading branch information
n8marti committed Apr 29, 2024
1 parent 4ea4721 commit 70ffcc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ def get_superuser_command():
if shutil.which('pkexec'):
config.SUPERUSER_COMMAND = "pkexec"
else:
logging.critical("No superuser command found. Please install pkexec.")
elif config.DIALOG != 'tk':
msg.logos_error("No superuser command found. Please install pkexec.") # noqa: E501
else:
if shutil.which('sudo'):
config.SUPERUSER_COMMAND = "sudo"
elif shutil.which('doas'):
config.SUPERUSER_COMMAND = "doas")
config.SUPERUSER_COMMAND = "doas"
else:
logging.critical("No superuser command found. Please install sudo or doas.")
msg.logos_error("No superuser command found. Please install sudo or doas.") # noqa: E501
logging.debug(f"{config.SUPERUSER_COMMAND=}")


Expand Down

0 comments on commit 70ffcc0

Please sign in to comment.