In shell scripting UPPER_CASE environment variables are only intended to be passed between commands. To avoid outside environment variables from shadowing script/function local variables, use lower_case variable names instead.
Thanks for the tip. My more recent scripts have stopped using allcaps everywhere and I'll go back through rust-installer and do some cleanup on this soon.
In shell scripting
UPPER_CASE
environment variables are only intended to be passed between commands. To avoid outside environment variables from shadowing script/function local variables, uselower_case
variable names instead.Sources: