Avoid error on closed pipe

pull/6/head
Jordan Liggitt 2018-01-03 16:40:57 -05:00
parent 637cd7d02a
commit 0d5b9dd3d4
No known key found for this signature in database
GPG Key ID: 39928704103C7229
1 changed files with 2 additions and 2 deletions

View File

@ -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"