Skip to content

Commit 5cc572f

Browse files
authored
Merge pull request kubernetes#88329 from claudiubelu/promoter/sed-fix
test images: Image Promoter sed fix
2 parents 6ec3ea8 + 6d3a18b commit 5cc572f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hack/lib/util.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,8 @@ function kube::util::ensure_dockerized {
700700
function kube::util::ensure-gnu-sed {
701701
# NOTE: the echo below is a workaround to ensure sed is executed before the grep.
702702
# see: https://github.com/kubernetes/kubernetes/issues/87251
703-
if LANG=C sed --help 2>&1 | grep -q "GNU\|BusyBox"; then
703+
sed_help="$(LANG=C sed --help 2>&1 || true)"
704+
if echo "${sed_help}" | grep -q "GNU\|BusyBox"; then
704705
SED="sed"
705706
elif command -v gsed &>/dev/null; then
706707
SED="gsed"

0 commit comments

Comments
 (0)