mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Don't fail if the grep fails to match any resources
This commit is contained in:
parent
e43e663a53
commit
eeec939361
@ -49,7 +49,7 @@ function gcloud-compute-list() {
|
|||||||
while true; do
|
while true; do
|
||||||
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
|
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
|
||||||
if [[ ! -z "${GREP_REGEX}" ]]; then
|
if [[ ! -z "${GREP_REGEX}" ]]; then
|
||||||
result=$(echo "${result}" | grep "${GREP_REGEX}")
|
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
|
||||||
fi
|
fi
|
||||||
echo "${result}"
|
echo "${result}"
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user