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