mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
hack/update-codegen.sh: split string into array robustly.
Use "mapfile" and "read" to split the $KUBE_AVAILABLE_GROUP_VERSIONS string into an array using space as the delimiter. This prevents shell from globbing and splitting the string in potentially wrong places.
This commit is contained in:
parent
7da195cac2
commit
b6fbe2aee5
@ -38,7 +38,7 @@ informergen=$(kube::util::find-binary "informer-gen")
|
||||
# that generates the set-gen program.
|
||||
#
|
||||
|
||||
GROUP_VERSIONS=(${KUBE_AVAILABLE_GROUP_VERSIONS})
|
||||
IFS=" " read -ra GROUP_VERSIONS <<< "$KUBE_AVAILABLE_GROUP_VERSIONS"
|
||||
GV_DIRS=()
|
||||
INTERNAL_DIRS=()
|
||||
for gv in "${GROUP_VERSIONS[@]}"; do
|
||||
|
Loading…
Reference in New Issue
Block a user