Skip to content

Query Installed Components and Toolchains聽#1658

Description

@naftulikay

Describe the problem you are trying to solve

I have an Ansible role for installing a Rust development environment on arbitrary Linux machines. One of the features I want to support is to install a list of components. In order to do this, I need some way of querying what is installed and what isn't, so I can only run the rustup component add command when the given component is not installed.

Describe the solution you'd like

If it were possible to do rustup components list --installed, this would satisfy my requirements and generally make scripting around rustup easier.

Notes

Outside of Ansible, this would also be useful in shell scripting:

if ! rustup component list --installed | grep -qP '^rls-x86_64-unknown-linux-gnu' ; then
    rustup component install rls-x86_64-unknown-linux-gnu
fi

More examples can also be thought of, but the use-case should be fairly clear.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions