mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Don't fail if the grep fails to match any resources
This commit is contained in:
		@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user