Merge pull request #88329 from claudiubelu/promoter/sed-fix

test images: Image Promoter sed fix
This commit is contained in:
Kubernetes Prow Robot 2020-02-26 03:54:40 -08:00 committed by GitHub
commit 5cc572f798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -700,7 +700,8 @@ function kube::util::ensure_dockerized {
function kube::util::ensure-gnu-sed {
# NOTE: the echo below is a workaround to ensure sed is executed before the grep.
# see: https://github.com/kubernetes/kubernetes/issues/87251
if LANG=C sed --help 2>&1 | grep -q "GNU\|BusyBox"; then
sed_help="$(LANG=C sed --help 2>&1 || true)"
if echo "${sed_help}" | grep -q "GNU\|BusyBox"; then
SED="sed"
elif command -v gsed &>/dev/null; then
SED="gsed"