Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eeec939

Browse files
committed
Don't fail if the grep fails to match any resources
1 parent e43e663 commit eeec939

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cluster/gce/list-resources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function gcloud-compute-list() {
4949
while true; do
5050
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
5151
if [[ ! -z "${GREP_REGEX}" ]]; then
52-
result=$(echo "${result}" | grep "${GREP_REGEX}")
52+
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
5353
fi
5454
echo "${result}"
5555
return

0 commit comments

Comments
 (0)