From eeec939361f08a3e8046877d32bf8337ff15db9b Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Wed, 22 Feb 2017 14:55:57 -0800 Subject: [PATCH] Don't fail if the grep fails to match any resources --- cluster/gce/list-resources.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/list-resources.sh b/cluster/gce/list-resources.sh index 82e5efa04acf..9790205c22d9 100755 --- a/cluster/gce/list-resources.sh +++ b/cluster/gce/list-resources.sh @@ -49,7 +49,7 @@ function gcloud-compute-list() { while true; do if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then if [[ ! -z "${GREP_REGEX}" ]]; then - result=$(echo "${result}" | grep "${GREP_REGEX}") + result=$(echo "${result}" | grep "${GREP_REGEX}" || true) fi echo "${result}" return