mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +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 message=$1
|
||||||
local match=$2
|
local match=$2
|
||||||
|
|
||||||
if echo "$message" | grep -q "$match"; then
|
if grep -q "${match}" <<< "${message}"; then
|
||||||
echo "Successful"
|
echo "Successful"
|
||||||
echo "message:$message"
|
echo "message:$message"
|
||||||
echo "has:$match"
|
echo "has:$match"
|
||||||
@ -283,7 +283,7 @@ kube::test::if_has_not_string() {
|
|||||||
local message=$1
|
local message=$1
|
||||||
local match=$2
|
local match=$2
|
||||||
|
|
||||||
if echo "$message" | grep -q "$match"; then
|
if grep -q "${match}" <<< "${message}"; then
|
||||||
echo "FAIL!"
|
echo "FAIL!"
|
||||||
echo "message:$message"
|
echo "message:$message"
|
||||||
echo "has:$match"
|
echo "has:$match"
|
||||||
|
Loading…
Reference in New Issue
Block a user