fix: bad return value
This commit is contained in:
parent
bf464fb09c
commit
7f325085c4
@ -22,7 +22,7 @@ function kgseckey() {
|
|||||||
local ret
|
local ret
|
||||||
|
|
||||||
ret="$(kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d)"
|
ret="$(kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d)"
|
||||||
if [ "$?" -eq 0 ] || [ -z "$ret" ]; then
|
if [ "$?" -ne 0 ] || [ -z "$ret" ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "$ret"
|
echo "$ret"
|
||||||
@ -34,7 +34,7 @@ function kgcmkey() {
|
|||||||
local ret;
|
local ret;
|
||||||
|
|
||||||
ret="$(kubectl get configmap "$cm" -o jsonpath="{.data.$key}")"
|
ret="$(kubectl get configmap "$cm" -o jsonpath="{.data.$key}")"
|
||||||
if [ "$?" -eq 0 ] || [ -z "$ret" ]; then
|
if [ "$?" -ne 0 ] || [ -z "$ret" ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "$ret"
|
echo "$ret"
|
||||||
|
Loading…
Reference in New Issue
Block a user