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.
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 addcommand 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 aroundrustupeasier.Notes
Outside of Ansible, this would also be useful in shell scripting:
More examples can also be thought of, but the use-case should be fairly clear.