From f1630cd6960914f0d9d8f6fcfb309381f1c3e88b Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 19 Nov 2024 15:45:08 +0100 Subject: [PATCH] Fix --- scripts/env.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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