shellcheck
shellcheck copied to clipboard
/bin/dash detect error
try to consider, and compare,
curl -fsSL -o /dev/null -X PUT "$REG_URL/$id/account" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"license":'"${ROOT_LICENSE}"'
}'
curl -fsSL -o /dev/null -X PUT "$REG_URL/$id/account" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"license":'"${license}"'
}'
And,
curl -fsSL -o /dev/null -X PUT "$REG_URL/$id/account" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"license":"'${ROOT_LICENSE}'"
}'
curl -fsSL -o /dev/null -X PUT "$REG_URL/$id/account" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"license":"'${license}'"
}'
The detection approach is obvious wrong, which detection the right one as issued one, and the error one as correct, caused fundamental error.