astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.82k stars 467 forks source link

installer: `.profile` is not used by Bash (or Zsh); edit `.bash_profile` or `.bash_login` (Bash) or `.zprofile` (Zsh) too #1119

Open tats-u opened 5 months ago

tats-u commented 5 months ago

Steps to Reproduce

  1. Ensure there's .bash_profile or .bash_login (Bash) or .zprofile (Zsh)
  2. curl -sSf https://rye.astral.sh/get | bash
  3. Should the installer add Rye to {} via .profile?y
  4. Confim .profile has been edited
  5. Restart Bash or Zsh
  6. which rye

Expected Result

Rye's path is shown

Actual Result

Command 'rye' not found, did you mean:

Version Info

Today (https://rye.astral.sh/get) Ubuntu 22.04 WSL

Stacktrace

No response

tats-u commented 5 months ago

Bash doesn't load .profile while .bash_profile or .bash_login exists. I think Zsh neither (.zprofile instead) If the installer find .bash_profile, .bash_login, or .zprofile, it should edit them, too. (or only them)

Offending parts: