Commit eeec9393 authored by Jeff Grafton's avatar Jeff Grafton

Don't fail if the grep fails to match any resources

parent e43e663a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment