Fix list-resources grep

pull/6/head
Jeff Lowdermilk 2016-04-08 12:19:24 -07:00
parent 48fa998f58
commit 650d99fbd9
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