diff --git a/scripts/env.sh b/scripts/env.sh index 21f7e01..bb1a840 100644 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -4,10 +4,4 @@ response=`curl -X 'GET' "https://$VAULT_HOST/v1/$VAULT_SECRET_PATH" -s \ -H 'accept: application/json' \ -H "X-Vault-Token: $VAULT_TOKEN"` -data=`echo $response | jq -r '.data.data'` - -echo "$data" | jq -r 'to_entries[] | "\(.key)=\(.value)"' | while IFS= read -r line; do - key=$(echo "$line" | cut -d '=' -f 1) - value=$(echo "$line" | cut -d '=' -f 2-) - echo "$key=\"$value\"" -done +echo "$(echo "$response" | jq -r '.data.data | to_entries | map("\(.key)=\(.value)") | .[]')" \ No newline at end of file