rust-lang / rust-lang/rustup

Install script should put rust path in ~/.zprofile on macOS

Open
#4,772 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Verification
Problem

Running the installation script from the rust-lang.org install page on macOS adds . "$HOME/.cargo/env" to ~/.profile rather than ~/.zprofile where it needs to be to work.

Steps
  1. Run curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Restart Terminal, without manually sourcing the ~/.profile file.
  3. Rust will not run until ~/.profile is manually sourced or . "$HOME/.cargo/env" is moved to ~/.zprofile.
Possible Solution(s)

Have the setup script add . "$HOME/.cargo/env" to ~/.zprofile instead of ~/.profile on macOS specifically.

Notes

No response

Rustup version
rustup 1.29.0 (28d1352db 2026-03-05)
Installed toolchains
stable-aarch64-apple-darwin
OS version
macOS Tahoe version 26.3.1 (a)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the installer entry point at https://sh.rustup.rs and locate the logic that adds . "$HOME/.cargo/env" to ~/.profile. Reproduce the documented installation on macOS, then verify that the setup uses ~/.zprofile there while behavior on other platforms remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.