Skip to content

Commit 209f100

Browse files
author
OpenShift Bot
authored
Merge pull request #13376 from stevekuznetsov/skuznets/better-path
Merged by openshift-bot
2 parents 9aa98d1 + 3ddf28f commit 209f100

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hack/lib/util/environment.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ readonly -f os::util::environment::setup_all_server_vars
107107
# - export PATH
108108
function os::util::environment::update_path_var() {
109109
local prefix
110-
prefix="${OS_OUTPUT_BINPATH}/$(os::util::host_platform):"
110+
if os::util::find::system_binary 'go' >/dev/null 2>&1; then
111+
prefix+="${OS_OUTPUT_BINPATH}/$(os::util::host_platform):"
112+
fi
111113
if [[ -n "${GOPATH:-}" ]]; then
112114
prefix+="${GOPATH}/bin:"
113115
fi
114116

115-
PATH="${prefix}:${PATH}"
117+
PATH="${prefix}${PATH}"
116118
export PATH
117119
}
118120
readonly -f os::util::environment::update_path_var

0 commit comments

Comments
 (0)