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

Skip to content

Commit 587d164

Browse files
authored
Merge pull request kubernetes#43185 from fejta/fix
Don't fail if the grep fails to match any resources
2 parents 9c869b2 + 1759483 commit 587d164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)