`rustup self uninstall --no-modify-path` is leaving dangling source line in rc files
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 58/100
Rechercherichtung
Start by tracing the Unix uninstall path for rustup self uninstall --no-modify-path and how it handles the CARGO_HOME/env script and shell rc entries. Reproduce the reported warning after uninstalling with that option, then check whether keeping the env script resolves it without changing default uninstall behavior. Done means the rc file no longer sources a missing script.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
Due to our current uninstallation policy, by default, we're adding a line in user's rc file for sourcing a env script implement the auto PATH adding upon normal installation with modify path.
However, the current uninstallatio by default removes all of the files in CARGO_HOME and RUSTUP_HOME, causing uninstallation with rustup self uninstall --no-modify-path leaving behind a source cmd for sourcing nothing.
Steps
- Install rustup with modify path on any Unix os.
- Uninstall rustup with
rustup self uninstall --no-modify-path.
If you're using bash/zsh/ash, this would immediately causing a warn like this:
source:xxx: no such file or directory: cargo_home/env
Possible Solution(s)
Keep the env script upon rustup self uninstall --no-modify-path.
Notes
No response
Rustup version
rustup 1.29.3 (2026-11-11)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.100.0 (0ef1bc386 2026-11-09)`
Installed toolchains
Not related.
OS version
Any Unix OS.
- Vorherrschende Sprache
- Rust
- Sterne
- 7.1k
- Forks
- 1.1k
- Ø Merge
- 16 Std. 36 Min.
- Gemergte PRs (30 T.)
- 54
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-lang/rustup
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
rust-lang/rustup#5172 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement O-shell
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
RustUp-init and better arm64 support for Windows.Evtl. vergeben @crutkas hat das vor 1 Tag übernommen. Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rust-lang/rustup
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
tamatebako/tebako#1155 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
swc-project/swc-next-issues#1148 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
registrystack/registry-stack#2828 ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent:triaged arch-audit bug priority:p1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
SocketDev/socket-patch#2364 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag