shellcheck icon indicating copy to clipboard operation
shellcheck copied to clipboard

/bin/dash detect error

Open Mon-ius opened this issue 1 year ago • 0 comments

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.

Mon-ius avatar Aug 10 '24 11:08 Mon-ius