build: shorten UID/PATH check

pull/1010/head
Alad Wenter 3 months ago
parent d969ac64fe
commit 15375b1342
  1. 4
      lib/aur-build

@ -5,9 +5,7 @@ set -o errexit
shopt -s extglob
argv0=build
# Reset path when running elevated (#979)
if [[ $UID == 0 ]]; then
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
fi
[[ $UID == 0 ]] && PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
machine=$(uname -m)
startdir=$PWD
PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'

Loading…
Cancel
Save