Keep environment for sudo

To be able to set some other environment variables even if dokku gets
called from a different user we have to keep the environment with sudo
intact, so i added the -E option.
This commit is contained in:
Thomas Boerger
2014-11-13 16:50:44 +01:00
committed by Jose Diaz-Gonzalez
parent fd55e8d41b
commit 3faa37b2e1

2
dokku
View File

@@ -12,7 +12,7 @@ export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
[[ $DOKKU_TRACE ]] && set -x
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
sudo -u dokku -H $0 "$@"
sudo -u dokku -E -H $0 "$@"
exit
fi