Skip to content

Don't panic on broken symlinks when listing toolchains #141

@mkrasnitski

Description

@mkrasnitski

I have a stage1 symlink in my toolchain cache that can be broken depending on the state of my local copy of the rustc repository. Running cache cache toolchain while this symlink is broken panics in the following way:

thread 'main' panicked at src/commands/toolchains.rs:62:27:
called `Result::unwrap()` on an `Err` value: Error { depth: 0, inner: Io { path: Some("/home/michael/.local/share/rustup/toolchains/stage1"), err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }

It would be great to either print a proper error in this case, or otherwise continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions