From bc95f4945e6c7199db15631a8f60f4f0f6649dc6 Mon Sep 17 00:00:00 2001 From: Thunder <92260681+durantialex@users.noreply.github.com> Date: Tue, 17 Feb 2026 22:37:33 +0100 Subject: [PATCH] Notify command priviligies As a request of issue n.145, i made it that now it writes that you need to use the 'sudo' command for it to work, as before it made it that, if you want to update or remove or even install a package it made it that command a sudo, i then modified the value of the command and the output. --- usr/local/bin/apt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr/local/bin/apt b/usr/local/bin/apt index 75788f1..cc4f444 100755 --- a/usr/local/bin/apt +++ b/usr/local/bin/apt @@ -171,7 +171,15 @@ if os.getuid() != 0: simoptfound = True if not simoptfound: - command = ["sudo"] + command + printable_command = command.copy() + printable_command[0] = os.path.basename(printable_command[0]) + + print("This command needs to be run with root privileges.") + print("Try using:") + print(" sudo " + " ".join(printable_command)) + sys.exit(1) + + # Color highlighting if argcommand in ("content", "version", "policy", "depends", "rdepends", "search") and len(argoptions) >= 1: