Skip to content

Commit

Permalink
use normal sudo arg to preserve env
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Jul 24, 2018
1 parent a089c57 commit 6a8400b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions hack/lib/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,11 @@ function os::start::internal::openshift_executable() {

openshift_executable="${sudo} docker run ${docker_options} ${volumes} ${envvars} openshift/origin:${version}"
else
local envvars=""
if [[ -n "${ENV:-}" ]]; then
envvars="env "
for envvar in "${ENV[@]}"; do
envvars+="${envvar} "
done
fi

openshift_executable="${sudo} ${envvars} $(which openshift)"
if [[ -n "${sudo}" ]]; then
openshift_executable="${sudo} -E $(which openshift)"
else
openshift_executable="$(which openshift)"
fi
fi

echo "${openshift_executable}"
Expand Down

0 comments on commit 6a8400b

Please sign in to comment.