rust-lang / rust-lang/rustup

Uninstalling default toolchain leaves rustup in bad state

Open
#1,631 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

To reproduce:

$ rustup --version
rustup 1.16.0 (beab5ac2b 2018-12-06)
$ rustup install nightly-2019-01-27
$ rustup default nightly-2019-01-27
$ rustup uninstall nightly-2019-01-27
$ rustup show
Default host: x86_64-apple-darwin

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin

active toolchain
----------------

(error: toolchain 'nightly-2019-01-27-x86_64-apple-darwin' is not installed, not a directory: '/Users/user/.rustup/toolchains/nightly-2019-01-27-x86_64-apple-darwin')

Should the uninstall stop you from uninstalling something already set as default? Should the uninstall switch the users default back? Currently it silently works but then the user is in a bad state.

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

Reproduce the reported sequence with rustup install, rustup default, rustup uninstall, and rustup show. Trace how uninstalling the default toolchain is handled and confirm the resulting active toolchain no longer points to a missing directory; the remaining behavior choice is whether to block removal or select another default.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.