From c02556e2905dc1801d751db8cc3e96ccbedb76ab Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 24 Mar 2011 10:10:05 -0400 Subject: Rely on the return value of type instead of its output Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- contrib/pacscripts.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/pacscripts.in b/contrib/pacscripts.in index d3664091..8ad5173b 100755 --- a/contrib/pacscripts.in +++ b/contrib/pacscripts.in @@ -61,7 +61,7 @@ spacman() { if [ $EUID -eq 0 ]; then pacman "$@" else - if [ ! "$(type -p sudo)" ]; then + if ! type -p sudo; then error "Cannot find the sudo binary! Is sudo installed?" error "Otherwise try to run the program as root" exit 1 -- cgit v1.2.3-70-g09d2