Use home directory for HOME env variable when using sudo
@@ -13,7 +13,7 @@ stat=(`stat -c "%g %u" ${@: -2:1}`)
if [ "${stat[0]}" != "0" ] && [ "${stat[1]}" != "0" ]; then
addgroup -S -g ${stat[0]} dogen
adduser -u ${stat[1]} -S -G dogen dogen
- sudo -E -u dogen /usr/bin/dogen $*
+ sudo -H -E -u dogen /usr/bin/dogen $*
else
/usr/bin/dogen "$@"
fi
