fix(scripts): shellcheck: SC2181
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 46s
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 46s
This commit is contained in:
parent
b569e49893
commit
d72d43a51f
@ -8,9 +8,14 @@ check_token() {
|
|||||||
set +e
|
set +e
|
||||||
|
|
||||||
echo "Checking for existing token..."
|
echo "Checking for existing token..."
|
||||||
token="$(kubectl get secret "$SECRET_NAME" -o jsonpath="{.data['token']}" 2> /dev/null)"
|
if ! token=$(kubectl get secret "${SECRET_NAME}" -o jsonpath="{.data['token']}" 2> /dev/null); then
|
||||||
[ $? -ne 0 ] && return 1
|
return 1
|
||||||
[ -z "$token" ] && return 2
|
fi
|
||||||
|
|
||||||
|
if [ -z "${token}" ]; then
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user