Skip to content

Commit edb86bc

Browse files
committed
use normal sudo arg to preserve env
1 parent 8dbf07d commit edb86bc

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

hack/lib/start.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,11 @@ function os::start::internal::openshift_executable() {
522522

523523
openshift_executable="${sudo} docker run ${docker_options} ${volumes} ${envvars} openshift/origin:${version}"
524524
else
525-
local envvars=""
526-
if [[ -n "${ENV:-}" ]]; then
527-
envvars="env "
528-
for envvar in "${ENV[@]}"; do
529-
envvars+="${envvar} "
530-
done
531-
fi
532-
533-
openshift_executable="${sudo} ${envvars} $(which openshift)"
525+
if [[ -n "${sudo}" ]]; then
526+
openshift_executable="${sudo} -E $(which openshift)"
527+
else
528+
openshift_executable="$(which openshift)"
529+
fi
534530
fi
535531

536532
echo "${openshift_executable}"

0 commit comments

Comments
 (0)