Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion usr/local/bin/apt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down