mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #84228 from mm4tt/prune_whitelist
Addon Manager: Fix bug in generate_prune_whitelist_flags
This commit is contained in:
commit
5a873e6e8c
@ -108,7 +108,11 @@ function log() {
|
|||||||
function generate_prune_whitelist_flags() {
|
function generate_prune_whitelist_flags() {
|
||||||
local -r resources=( "$@" )
|
local -r resources=( "$@" )
|
||||||
for resource in "${resources[@]}"; do
|
for resource in "${resources[@]}"; do
|
||||||
|
# Check if $resource isn't composed just of whitespaces by replacing ' '
|
||||||
|
# with '' and checking whether the resulting string is not empty.
|
||||||
|
if [[ -n "${resource// /}" ]]; then
|
||||||
printf "%s" "--prune-whitelist ${resource} "
|
printf "%s" "--prune-whitelist ${resource} "
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user