mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Merge pull request #84228 from mm4tt/prune_whitelist
Addon Manager: Fix bug in generate_prune_whitelist_flags
This commit is contained in:
@@ -108,7 +108,11 @@ function log() {
|
||||
function generate_prune_whitelist_flags() {
|
||||
local -r resources=( "$@" )
|
||||
for resource in "${resources[@]}"; do
|
||||
printf "%s" "--prune-whitelist ${resource} "
|
||||
# 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} "
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user