Merge pull request #84228 from mm4tt/prune_whitelist

Addon Manager: Fix bug in generate_prune_whitelist_flags
This commit is contained in:
Kubernetes Prow Robot
2019-10-23 12:51:51 -07:00
committed by GitHub

View File

@@ -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
}