Merge pull request #41933 from ixdy/list-resources-grep
list-resources: don't fail if the grep fails to match any resources
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user