mirror of https://github.com/k3s-io/k3s
fix unbound array variable
parent
1b18987e57
commit
a878f90f63
|
@ -163,6 +163,8 @@ kube::golang::dedup() {
|
||||||
# to readonly.
|
# to readonly.
|
||||||
# The configured vars will only contain platforms allowed by the
|
# The configured vars will only contain platforms allowed by the
|
||||||
# KUBE_SUPPORTED* vars at the top of this file.
|
# KUBE_SUPPORTED* vars at the top of this file.
|
||||||
|
declare -a -g KUBE_SERVER_PLATFORMS
|
||||||
|
declare -a -g KUBE_CLIENT_PLATFORMS
|
||||||
kube::golang::setup_platforms() {
|
kube::golang::setup_platforms() {
|
||||||
if [[ -n "${KUBE_BUILD_PLATFORMS:-}" ]]; then
|
if [[ -n "${KUBE_BUILD_PLATFORMS:-}" ]]; then
|
||||||
# KUBE_BUILD_PLATFORMS needs to be read into an array before the next
|
# KUBE_BUILD_PLATFORMS needs to be read into an array before the next
|
||||||
|
@ -202,20 +204,23 @@ kube::golang::setup_platforms() {
|
||||||
readonly KUBE_CLIENT_PLATFORMS
|
readonly KUBE_CLIENT_PLATFORMS
|
||||||
|
|
||||||
elif [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then
|
elif [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then
|
||||||
readonly KUBE_SERVER_PLATFORMS=(linux/amd64)
|
KUBE_SERVER_PLATFORMS=(linux/amd64)
|
||||||
|
readonly KUBE_SERVER_PLATFORMS
|
||||||
readonly KUBE_NODE_PLATFORMS=(linux/amd64)
|
readonly KUBE_NODE_PLATFORMS=(linux/amd64)
|
||||||
if [[ "${KUBE_BUILDER_OS:-}" == "darwin"* ]]; then
|
if [[ "${KUBE_BUILDER_OS:-}" == "darwin"* ]]; then
|
||||||
readonly KUBE_TEST_PLATFORMS=(
|
readonly KUBE_TEST_PLATFORMS=(
|
||||||
darwin/amd64
|
darwin/amd64
|
||||||
linux/amd64
|
linux/amd64
|
||||||
)
|
)
|
||||||
readonly KUBE_CLIENT_PLATFORMS=(
|
KUBE_CLIENT_PLATFORMS=(
|
||||||
darwin/amd64
|
darwin/amd64
|
||||||
linux/amd64
|
linux/amd64
|
||||||
)
|
)
|
||||||
|
readonly KUBE_CLIENT_PLATFORMS
|
||||||
else
|
else
|
||||||
readonly KUBE_TEST_PLATFORMS=(linux/amd64)
|
readonly KUBE_TEST_PLATFORMS=(linux/amd64)
|
||||||
readonly KUBE_CLIENT_PLATFORMS=(linux/amd64)
|
KUBE_CLIENT_PLATFORMS=(linux/amd64)
|
||||||
|
readonly KUBE_CLIENT_PLATFORMS
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
KUBE_SERVER_PLATFORMS=("${KUBE_SUPPORTED_SERVER_PLATFORMS[@]}")
|
KUBE_SERVER_PLATFORMS=("${KUBE_SUPPORTED_SERVER_PLATFORMS[@]}")
|
||||||
|
|
Loading…
Reference in New Issue