Note that even checking the URL first doesn't help as there is a way to detect whether the output is being piped into Bash: https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
The proper way to tell is to save the output to a file, analyze it, and then run that file with Bash. However, I would recommend against running these for other reasons and instead prefer using the distribution's packages or the manual installation instructions which you can understand and tweak to better fit your system.