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 authored and Jose Diaz-Gonzalez committed 2014-11-23 20:32:13 -05:00
1 parent fd55e8d41b
commit 3faa37b2e1
1 file changed
+1 -1
+1 -1
View File
@@ -12,7 +12,7 @@ export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
[[ $DOKKU_TRACE ]] && set -x [[ $DOKKU_TRACE ]] && set -x
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
sudo -u dokku -H $0 "$@" sudo -u dokku -E -H $0 "$@"
exit exit
fi fi