mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Fix bugs in cluster/get-kube-local.sh
- default the release to the value of latest_release instead of the string 'latest_release' - use curl -O when retrieving kubectl to write output to disk instead of to the screen
This commit is contained in:
@@ -114,7 +114,7 @@ function get_latest_version_number {
|
|||||||
}
|
}
|
||||||
|
|
||||||
latest_release=$(get_latest_version_number)
|
latest_release=$(get_latest_version_number)
|
||||||
release=${KUBE_VERSION:-latest_release}
|
release=${KUBE_VERSION:-${latest_release}}
|
||||||
|
|
||||||
uname=$(uname)
|
uname=$(uname)
|
||||||
if [[ "${uname}" == "Darwin" ]]; then
|
if [[ "${uname}" == "Darwin" ]]; then
|
||||||
@@ -151,7 +151,7 @@ if [[ $(ls . | grep ^kubectl$ | wc -l) -lt 1 ]]; then
|
|||||||
if [[ $(which wget) ]]; then
|
if [[ $(which wget) ]]; then
|
||||||
run "wget ${kubectl_url}"
|
run "wget ${kubectl_url}"
|
||||||
elif [[ $(which curl) ]]; then
|
elif [[ $(which curl) ]]; then
|
||||||
run "curl -L ${kubectl_url}"
|
run "curl -OL ${kubectl_url}"
|
||||||
else
|
else
|
||||||
echo_red "Couldn't find curl or wget. Bailing out."
|
echo_red "Couldn't find curl or wget. Bailing out."
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user