fix: bad return value

This commit is contained in:
ange 2024-06-05 11:45:48 +02:00
parent bf464fb09c
commit 7f325085c4
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -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"