SC2155: Declare and assign separately to avoid masking return values

This commit is contained in:
Stéphane Cottin 2020-09-17 17:35:24 +02:00
parent 7ad3e809a4
commit 1ea5fe6b6d
No known key found for this signature in database
GPG Key ID: 94ACF3717D74E1CC

View File

@ -54,12 +54,13 @@ vault_cli_deploy() {
fi
if [ -n "$VAULT_ROLE_ID" ]; then
export VAULT_TOKEN=$(vault write -field=token auth/approle/login \
VAULT_TOKEN=$(vault write -field=token auth/approle/login \
role_id="$VAULT_ROLE_ID" secret_id="$VAULT_ROLE_SECRET")
if [ ! $? ]; then
_err "cannot login to vault approle ${VAULT_ROLE_ID}!"
return 1
fi
export VAULT_TOKEN
fi
if [ -n "$FABIO" ]; then