Merge pull request #232 from yuvipanda/no-e

Exit when tljh-config is called as non-root
This commit is contained in:
Erik Sundell
2021-10-18 18:22:31 +02:00
committed by GitHub

View File

@@ -306,7 +306,9 @@ def _is_list(item):
def main(argv=None): def main(argv=None):
if os.geteuid() != 0: if os.geteuid() != 0:
print("It looks like this command wasn't run with root privileges. Perhaps you didn't use `sudo -E`?") print("tljh-config needs root privileges to run", file=sys.stderr)
print("Try using sudo before the tljh-config command you wanted to run", file=sys.stderr)
sys.exit(1)
if argv is None: if argv is None:
argv = sys.argv[1:] argv = sys.argv[1:]