You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each call will therefore write at least one file (.profile, .bash_profile, .zshrc), regardless of which other files exist.
Issue:
In my case, I use bash and put all my configuration in .profile. bash will only load .profile if a .bash_profile does not exist, so the current behaviour of the installer effectively clobbers my local profile.
Possible solution:
Assuming this is undesired behaviour rather than an unsupported configuration at my end (though correct me if I'm wrong), this could be improved by making a single call to add_install_dir_to_path:
Context:
The current logic for
add_install_dir_to_path
will write to the first file name in the list given to it if none of the files exist:cargo-dist/cargo-dist/templates/installer/installer.sh.j2
Lines 465 to 472 in b9c9a51
add_install_dir_to_path
is called three times, with different file names:cargo-dist/cargo-dist/templates/installer/installer.sh.j2
Lines 398 to 403 in b9c9a51
Each call will therefore write at least one file (
.profile
,.bash_profile
,.zshrc
), regardless of which other files exist.Issue:
In my case, I use
bash
and put all my configuration in.profile
.bash
will only load.profile
if a.bash_profile
does not exist, so the current behaviour of the installer effectively clobbers my local profile.Possible solution:
Assuming this is undesired behaviour rather than an unsupported configuration at my end (though correct me if I'm wrong), this could be improved by making a single call to
add_install_dir_to_path
:This would have the effect of creating
~/.profile
if none of the files exist. As a lowest common denominator this seems like a reasonable choice.The text was updated successfully, but these errors were encountered: