[pacman-dev] [PATCH v2] pacscripts: Improve error message when sudo binary is not found

Jason St. John jstjohn at purdue.edu
Fri Nov 15 23:56:05 EST 2013


Signed-off-by: Jason St. John <jstjohn at purdue.edu>
---
This is a resubmit of my previous patch here:
https://mailman.archlinux.org/pipermail/pacman-dev/2013-November/018212.html


 contrib/pacscripts.sh.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in
index 8453f9c..da7c55a 100644
--- a/contrib/pacscripts.sh.in
+++ b/contrib/pacscripts.sh.in
@@ -71,8 +71,8 @@ spacman() {
 		pacman "$@"
 	else
 		if ! type -p sudo; then
-			error "Cannot find the sudo binary! Is sudo installed?"
-			error "Otherwise, try to run the program as root"
+			error "Cannot find the sudo binary!"
+			error "${myname} requires root privileges. Either install \"sudo\" or run as root."
 			exit 1
 		else
 			sudo pacman "$@"
-- 
1.8.4.2



More information about the pacman-dev mailing list