[1/3] paccache: Clarify sudo usage

Message ID 20200903013655.92224-1-polyzen@archlinux.org
State Accepted, archived
Delegated to: Johannes Löthberg
Headers show
Series [1/3] paccache: Clarify sudo usage | expand

Commit Message

Daniel M. Capella Sept. 3, 2020, 1:36 a.m. UTC
"Privilege escalation required" sounds more like an error.

Signed-off-by: Daniel M. Capella <polyzen@archlinux.org>
---
 src/paccache.sh.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Johannes Löthberg Oct. 23, 2020, 3:10 p.m. UTC | #1
Patch 1 and 2 applied.

Patch

diff --git a/src/paccache.sh.in b/src/paccache.sh.in
index 1311fd7..fa53d58 100644
--- a/src/paccache.sh.in
+++ b/src/paccache.sh.in
@@ -138,11 +138,11 @@  m4_include(../lib/size_to_human.sh)
 
 runcmd() {
 	if (( needsroot && EUID != 0 )); then
-		msg "Privilege escalation required"
+		msg 'Escalating privileges using sudo'
 		if sudo -v &>/dev/null && sudo -l &>/dev/null; then
 			sudo "$@"
 		else
-			die 'Unable to escalate privileges using sudo'
+			die 'Failed to escalate'
 		fi
 	else
 		"$@"