Skip to content

Commit 62880cb

Browse files
authored
Merge pull request kubernetes#90421 from neolit123/1.19-remove-cluster-clientbin
/cluster: cleanup clientbin.sh
2 parents 3c3497b + b4bbf0a commit 62880cb

File tree

3 files changed

+13
-121
lines changed

3 files changed

+13
-121
lines changed

cluster/BUILD

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ sh_test(
4444
],
4545
)
4646

47-
sh_test(
48-
name = "clientbin_test",
49-
srcs = ["clientbin.sh"],
50-
deps = [
51-
"//hack/lib",
52-
],
53-
)
54-
5547
sh_test(
5648
name = "kube-util_test",
5749
srcs = ["kube-util.sh"],

cluster/clientbin.sh

Lines changed: 0 additions & 110 deletions
This file was deleted.

cluster/kubectl.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,25 @@ set -o pipefail
3232

3333
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..}
3434
source "${KUBE_ROOT}/cluster/kube-util.sh"
35-
source "${KUBE_ROOT}/cluster/clientbin.sh"
35+
source "${KUBE_ROOT}/hack/lib/util.sh"
3636

3737
# If KUBECTL_PATH isn't set, gather up the list of likely places and use ls
3838
# to find the latest one.
3939
if [[ -z "${KUBECTL_PATH:-}" ]]; then
40-
kubectl=$( get_bin "kubectl" "cmd/kubectl" )
40+
kubectl=$( kube::util::find-binary "kubectl" )
4141

4242
if [[ ! -x "$kubectl" ]]; then
43-
print_error "kubectl"
43+
{
44+
echo "It looks as if you don't have a compiled kubectl binary"
45+
echo
46+
echo "If you are running from a clone of the git repo, please run"
47+
echo "'./build/run.sh make cross'. Note that this requires having"
48+
echo "Docker installed."
49+
echo
50+
echo "If you are running from a binary release tarball, something is wrong. "
51+
echo "Look at http://kubernetes.io/ for information on how to contact the "
52+
echo "development team for help."
53+
} >&2
4454
exit 1
4555
fi
4656
elif [[ ! -x "${KUBECTL_PATH}" ]]; then

0 commit comments

Comments
 (0)