Browse Source

SC2155: Declare and assign separately to avoid masking return values

pull/3182/head
Stéphane Cottin 4 years ago
parent
commit
1ea5fe6b6d
No known key found for this signature in database GPG Key ID: 94ACF3717D74E1CC
  1. 3
      deploy/vault_cli.sh

3
deploy/vault_cli.sh

@ -54,12 +54,13 @@ vault_cli_deploy() {
fi fi
if [ -n "$VAULT_ROLE_ID" ]; then 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") role_id="$VAULT_ROLE_ID" secret_id="$VAULT_ROLE_SECRET")
if [ ! $? ]; then if [ ! $? ]; then
_err "cannot login to vault approle ${VAULT_ROLE_ID}!" _err "cannot login to vault approle ${VAULT_ROLE_ID}!"
return 1 return 1
fi fi
export VAULT_TOKEN
fi fi
if [ -n "$FABIO" ]; then if [ -n "$FABIO" ]; then

Loading…
Cancel
Save