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

Skip to content

Commit 9b12e37

Browse files
authored
Merge pull request #41933 from ixdy/list-resources-grep
list-resources: don't fail if the grep fails to match any resources
2 parents 2e12711 + eeec939 commit 9b12e37

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)