aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-08-20 11:42:54 +0200
committerGuido Günther <agx@sigxcpu.org>2015-08-20 11:47:23 +0200
commit4be0df7cd46f26413c7dae2e7db3a355afa65b1e (patch)
tree41e8da74fd2697928634f38838dd9ecf03422c6b /bin
parentfc60141dfb1720cff78b2910e2dbd817d1b4dc12 (diff)
Check for sudo
Closes: #796046
Diffstat (limited to 'bin')
-rw-r--r--bin/git-pbuilder6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/git-pbuilder b/bin/git-pbuilder
index 31bf3b19..379227d9 100644
--- a/bin/git-pbuilder
+++ b/bin/git-pbuilder
@@ -239,6 +239,12 @@ if [ -n "$action" ]; then
OPTIONS+=( --configfile "$HOME/.pbuilderrc" )
fi
+ if ! which sudo >/dev/null 2>&1; then
+ echo 'sudo not found in $PATH; you need to install the sudo package'
+ echo 'and allow the current user to invoke the builder via sudo' >&2
+ exit 1
+ fi
+
# Run the builder.
if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then
sudo "$BUILDER" "$action" "${OPTIONS[@]}" "$@"