Index: build/utils/download-api-client ================================================================== --- build/utils/download-api-client +++ build/utils/download-api-client @@ -173,11 +173,14 @@ kit_filename_platform="$(jq -crM .platform <<<"${info}")" kit_filename_tcl_version="$(jq -crM .tcl_version <<<"${info}")" kit_filename="${kit_filename_base}-${kit_filename_platform}-${kit_filename_tcl_version}${kit_filename_ext}" fi - curl -sSL "${kit_url}" > "${kit_filename}" + curl -sSL "${kit_url}" > "${kit_filename}" || ( + rm -f "${kit_filename}" + exit 1 + ) || exit 1 chmod 755 "${kit_filename}" else kit_sdk_url="$(jq -crM .kit_sdk_url <<<"${info}")" if [ "${kit_sdk_url}" = 'null' ]; then kit_sdk_url='' @@ -188,10 +191,13 @@ fi if [ -z "${kit_filename}" ]; then kit_filename="${kit_sdk_url//*\//}" fi - curl -sSL "${kit_sdk_url}" > "${kit_filename}" + curl -sSL "${kit_sdk_url}" > "${kit_filename}" || ( + rm -f "${kit_filename}" + exit 1 + ) || exit 1 fi echo "Wrote: ${kit_filename}" exit 0