mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Avoid error on closed pipe
This commit is contained in:
parent
637cd7d02a
commit
0d5b9dd3d4
@ -265,7 +265,7 @@ kube::test::if_has_string() {
|
||||
local message=$1
|
||||
local match=$2
|
||||
|
||||
if echo "$message" | grep -q "$match"; then
|
||||
if grep -q "${match}" <<< "${message}"; then
|
||||
echo "Successful"
|
||||
echo "message:$message"
|
||||
echo "has:$match"
|
||||
@ -283,7 +283,7 @@ kube::test::if_has_not_string() {
|
||||
local message=$1
|
||||
local match=$2
|
||||
|
||||
if echo "$message" | grep -q "$match"; then
|
||||
if grep -q "${match}" <<< "${message}"; then
|
||||
echo "FAIL!"
|
||||
echo "message:$message"
|
||||
echo "has:$match"
|
||||
|
Loading…
Reference in New Issue
Block a user