mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Handle unset dollar-at.
When no args are passed to a script, "$@" is unset, which causes a shell error in "nounset" mode. This change passes an empty string to kubectl in that case so it can print help.
This commit is contained in:
parent
42f04587d0
commit
9e015fd216
@ -128,5 +128,5 @@ if [[ -n "${KUBE_MASTER_IP-}" && -z "${KUBERNETES_MASTER-}" ]]; then
|
|||||||
export KUBERNETES_MASTER=https://${KUBE_MASTER_IP}
|
export KUBERNETES_MASTER=https://${KUBE_MASTER_IP}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running:" "${kubectl}" "${config[@]:+${config[@]}}" "${@}" >&2
|
echo "Running:" "${kubectl}" "${config[@]:+${config[@]}}" "${@+$@}" >&2
|
||||||
"${kubectl}" "${config[@]:+${config[@]}}" "${@}"
|
"${kubectl}" "${config[@]:+${config[@]}}" "${@+$@}"
|
||||||
|
Loading…
Reference in New Issue
Block a user