mirror of https://github.com/k3s-io/k3s
Avoid error on closed pipe
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