File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ function clear_status_set_by() {
22
22
local router_name=" ${1} "
23
23
24
24
for namespace in $( oc get namespaces -o ' jsonpath={.items[*].metadata.name}' ) ; do
25
- local routes; routes=$( oc get routes -o jsonpath=' {.items[*].metadata.name}' --namespace=" ${namespace} " 2> /dev/null)
26
- if [[ -n " ${routes} " ]]; then
27
- for route in " ${routes} " ; do
25
+ local routes; routes=( $( oc get routes -o jsonpath=' {.items[*].metadata.name}' --namespace=" ${namespace} " 2> /dev/null) )
26
+ if [[ " ${# routes[@]} " -ne 0 ]]; then
27
+ for route in " ${routes[@] } " ; do
28
28
clear_routers_status " ${namespace} " " ${route} " " ${router_name} "
29
29
done
30
30
else
@@ -106,9 +106,9 @@ namespace="${1}"
106
106
route_name=" ${2} "
107
107
108
108
if [[ " ${route_name} " == " ALL" ]]; then
109
- routes=$( oc get routes -o jsonpath=' {.items[*].metadata.name}' --namespace=" ${namespace} " 2> /dev/null)
110
- if [[ -n " ${routes} " ]]; then
111
- for route in " ${routes} " ; do
109
+ routes=( $( oc get routes -o jsonpath=' {.items[*].metadata.name}' --namespace=" ${namespace} " 2> /dev/null) )
110
+ if [[ " ${# routes[@]} " -ne 0 ]]; then
111
+ for route in " ${routes[@] } " ; do
112
112
clear_status " ${namespace} " " ${route} "
113
113
done
114
114
else
You can’t perform that action at this time.
0 commit comments