rust-lang / rust-lang/rustup

Setting RUSTUP_HOME and CARGO_HOME before running rustup installation does not work in Windows

Open
#4,687 7 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

Defining RUSTUP_HOME and/or CARGO_HOME environment variables to override default installation directory for .cargo and .rustup does not work (in Windows at least).

Steps to reproduce:

Define RUSTUP_HOME as an environment variable
Define CARGO_HOME as an environment variable
Double click on rustup-init.exe to begin the installation

Result:

.rustup and .cargo will be installed at the default directory which is %USERPROFILE%.

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 by reproducing the installation on Windows with RUSTUP_HOME and CARGO_HOME set, launching rustup-init.exe as described. Follow the installer path that reads these environment variables and verify that the resulting .rustup and .cargo directories use the configured locations rather than %USERPROFILE%.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.