mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +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() {
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user