Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b30876a

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#58157 from liggitt/automated-cherry-pick-of-#57805-upstream-release-1.8
Automatic merge from submit-queue. Automated cherry pick of kubernetes#57805: Avoid error on closed pipe Cherry pick of kubernetes#57805 on release-1.8. kubernetes#57805: Avoid error on closed pipe ```release-note NONE ```
2 parents f50b343 + 17bdf8d commit b30876a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/lib/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ kube::test::if_has_string() {
265265
local message=$1
266266
local match=$2
267267

268-
if echo "$message" | grep -q "$match"; then
268+
if grep -q "${match}" <<< "${message}"; then
269269
echo "Successful"
270270
echo "message:$message"
271271
echo "has:$match"
@@ -283,7 +283,7 @@ kube::test::if_has_not_string() {
283283
local message=$1
284284
local match=$2
285285

286-
if echo "$message" | grep -q "$match"; then
286+
if grep -q "${match}" <<< "${message}"; then
287287
echo "FAIL!"
288288
echo "message:$message"
289289
echo "has:$match"

0 commit comments

Comments
 (0)