diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index e38fdfd17b5..5f56a81500d 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -401,7 +401,7 @@ kube::golang::place_bins() { # The substitution on platform_src below will replace all slashes with # underscores. It'll transform darwin/amd64 -> darwin_amd64. local platform_src="/${platform//\//_}" - if [[ $platform == $host_platform ]]; then + if [[ "$platform" == "$host_platform" ]]; then platform_src="" rm -f "${THIS_PLATFORM_BIN}" ln -s "${KUBE_OUTPUT_BINPATH}/${platform}" "${THIS_PLATFORM_BIN}" @@ -465,7 +465,7 @@ kube::golang::output_filename_for_binary() { local binary=$1 local platform=$2 local output_path="${KUBE_GOPATH}/bin" - if [[ $platform != $host_platform ]]; then + if [[ "$platform" != "$host_platform" ]]; then output_path="${output_path}/${platform//\//_}" fi local bin=$(basename "${binary}")