Merge pull request #24058 from jlowdermilk/fix-list-resources

Fix list-resources grep
pull/6/head
Jeff Lowdermilk 2016-04-08 12:41:40 -07:00
commit 601262af0d
1 changed files with 4 additions and 1 deletions

View File

@ -47,7 +47,10 @@ function gcloud-compute-list() {
local attempt=1
local result=""
while true; do
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2} | grep "${GREP_REGEX}"); then
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
if [[ ! -z "${GREP_REGEX}" ]]; then
result=$(echo "${result}" | grep "${GREP_REGEX}")
fi
echo "${result}"
return
fi