Add -E flag to sudo (fixes #8494)

Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
Upstream-commit: e01e913d80dcbd509a003feb55c7cdb6fc9758c2
Component: engine
This commit is contained in:
Jérôme Petazzoni
2014-10-09 14:54:22 -07:00
parent 94e55f882a
commit bdbbff32ad
+1 -1
View File
@@ -42,7 +42,7 @@ user="$(id -un 2>/dev/null || true)"
sh_c='sh -c'
if [ "$user" != 'root' ]; then
if command_exists sudo; then
sh_c='sudo sh -c'
sh_c='sudo -E sh -c'
elif command_exists su; then
sh_c='su -c'
else