You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem rustup component remove [component] fails if component files do not exist. This, incidentally, will also break rustup update.
Windows had some issues, and after some repair my recently installed clippy executables were deleted. However, rustup was still of the opinion that clippy was installed, preventing me from updating/adding/removing components:
$ rustup component list | rg clippy
clippy-x86_64-pc-windows-msvc (installed)
$ rustup component remove clippy-x86_64-pc-windows-msvc
info: removing component 'clippy'
info: rolling back changes
error: failure removing component 'clippy-preview-x86_64-pc-windows-msvc', directory does not exist: 'bin/cargo-clippy.exe'
Steps
Here are the steps to produce this issue with the clippy component on windows:
Add a component: rustup component add clippy-preview
Possible Solution(s)
To workaround this issue, you can create empty files based on the error output of rustup component remove [x] until it succeeds, and then re-install the component.
I think to actually fix this issue, component remove should not panic when it tries to delete a file that does not exist, since its goal was to remove that file anyway.
Notes
Output of rustup --version: rustup 1.24.3 (ce5817a94 2021-05-31)
Output of rustup show:
Problem
rustup component remove [component]
fails if component files do not exist. This, incidentally, will also breakrustup update
.Windows had some issues, and after some repair my recently installed
clippy
executables were deleted. However, rustup was still of the opinion that clippy was installed, preventing me from updating/adding/removing components:Steps
Here are the steps to produce this issue with the
clippy
component on windows:rustup component add clippy-preview
C:\Users\[USERNAME]\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo-clippy.exe
rustup component remove clippy-x86_64-pc-windows-msvc
Possible Solution(s)
To workaround this issue, you can create empty files based on the error output of
rustup component remove [x]
until it succeeds, and then re-install the component.I think to actually fix this issue,
component remove
should not panic when it tries to delete a file that does not exist, since its goal was to remove that file anyway.Notes
Output of
rustup --version
:rustup 1.24.3 (ce5817a94 2021-05-31)
Output of
rustup show
:The text was updated successfully, but these errors were encountered: