The `set -e` at the top of the script causes the installation to fail to complete if the shell profile is not writeable. Checking file existence only is not enough. (cherry picked from commit ad0dc41899)
ad0dc41899