mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-23 10:58:42 +00:00
Minor bash update found by shellcheck.net
This commit is contained in:
@@ -166,7 +166,7 @@ __kubectl_get_resource()
|
|||||||
if [[ ${#nouns[@]} -eq 0 ]]; then
|
if [[ ${#nouns[@]} -eq 0 ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
__kubectl_parse_get ${nouns[${#nouns[@]} -1]}
|
__kubectl_parse_get "${nouns[${#nouns[@]} -1]}"
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -177,7 +177,7 @@ __kubectl_get_containers()
|
|||||||
{
|
{
|
||||||
local template
|
local template
|
||||||
template="{{ range .desiredState.manifest.containers }}{{ .name }} {{ end }}"
|
template="{{ range .desiredState.manifest.containers }}{{ .name }} {{ end }}"
|
||||||
__debug ${FUNCNAME} "nouns are ${nouns[@]}"
|
__debug "${FUNCNAME} nouns are ${nouns[*]}"
|
||||||
|
|
||||||
local len="${#nouns[@]}"
|
local len="${#nouns[@]}"
|
||||||
if [[ ${len} -ne 1 ]]; then
|
if [[ ${len} -ne 1 ]]; then
|
||||||
|
@@ -44,7 +44,7 @@ __kubectl_get_resource()
|
|||||||
if [[ ${#nouns[@]} -eq 0 ]]; then
|
if [[ ${#nouns[@]} -eq 0 ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
__kubectl_parse_get ${nouns[${#nouns[@]} -1]}
|
__kubectl_parse_get "${nouns[${#nouns[@]} -1]}"
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -55,7 +55,7 @@ __kubectl_get_containers()
|
|||||||
{
|
{
|
||||||
local template
|
local template
|
||||||
template="{{ range .desiredState.manifest.containers }}{{ .name }} {{ end }}"
|
template="{{ range .desiredState.manifest.containers }}{{ .name }} {{ end }}"
|
||||||
__debug ${FUNCNAME} "nouns are ${nouns[@]}"
|
__debug "${FUNCNAME} nouns are ${nouns[*]}"
|
||||||
|
|
||||||
local len="${#nouns[@]}"
|
local len="${#nouns[@]}"
|
||||||
if [[ ${len} -ne 1 ]]; then
|
if [[ ${len} -ne 1 ]]; then
|
||||||
|
Reference in New Issue
Block a user