diff --git a/resty b/resty index 3b6368f..7178724 100644 --- a/resty +++ b/resty @@ -214,7 +214,13 @@ HELP # Forge command and display it if dry-run local cmd - cmd=(curl -sLv $curl_opt $(printf "%q" "$body") -X $method -b \"$cookies/$domain\" -c \"$cookies/$domain\" "$(\ + # Flatcar: Add workaround for new curl versions + local body_arg=() + body_arg=($(printf "%q" "$body")) + if [ "${body_arg[*]}" = "" ] || [ "${body_arg[*]}" = "''" ]; then + body_arg=() + fi + cmd=(curl -sLv $curl_opt "${body_arg[@]}" -X $method -b \"$cookies/$domain\" -c \"$cookies/$domain\" "$(\ [ -n "$curlopt_cmd" ] && printf '%s ' ${curlopt_cmd[@]})"\"$_path$query\") if [ "$dry_run" = "yes" ] ; then echo "${cmd[@]}"