Quote echo $data in _porkbun_rest

Quote echo $data in _porkbun_rest to avoid
brace expansion under ksh (OpenBSD).
pull/5041/head
Jesse Miller 2024-03-06 15:56:42 -07:00
parent aa8cf76fb1
commit 92d37f6eaf
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ _porkbun_rest() {
api_key_trimmed=$(echo "$PORKBUN_API_KEY" | tr -d '"')
secret_api_key_trimmed=$(echo "$PORKBUN_SECRET_API_KEY" | tr -d '"')
test -z "$data" && data="{" || data="$(echo $data | cut -d'}' -f1),"
test -z "$data" && data="{" || data="$(echo "$data" | cut -d'}' -f1),"
data="$data\"apikey\":\"$api_key_trimmed\",\"secretapikey\":\"$secret_api_key_trimmed\"}"
export _H1="Content-Type: application/json"