rust installation command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
Follow the curl man page:
--fail-with-body
(HTTP) Return an error on server errors where the HTTP response code is 400 or greater). In normal cases when an HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will still allow curl to output and save that content but also to return error 22.
This is an alternative option to -f, --fail which makes curl fail for the same circumstances but without saving the content.
See also -f, --fail. Added in 7.76.0.
-f, --fail
(HTTP) Fail silently (no output at all) on server errors. This is mostly done to enable scripts etc to better deal with failed attempts. In normal cases when an HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22.
This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
See also --fail-with-body.
-S, --show-error
When used with -s, --silent, it makes curl show an error message if it fails.
See also --no-progress-meter.
-s, --silent
Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it.
Use -S, --show-error in addition to this option to disable progress meter but still show error messages.
See also -v, --verbose, --stderr and --no-progress-meter.
Does "-sSf" option not show error, fail and process?
Thanks.