mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +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
|
||||
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
|
||||
if [[ ! -z "${GREP_REGEX}" ]]; then
|
||||
result=$(echo "${result}" | grep "${GREP_REGEX}")
|
||||
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
|
||||
fi
|
||||
echo "${result}"
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user