Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to tell whether download/install is necessary #4000

Closed
smoelius opened this issue Aug 20, 2024 · 4 comments
Closed

Command to tell whether download/install is necessary #4000

smoelius opened this issue Aug 20, 2024 · 4 comments
Labels

Comments

@smoelius
Copy link
Contributor

I am looking for a command to tell me whether a toolchain would have to be downloaded/installed without actually downloading or installing anything.

Hypothetically:

$ rustup <args>
# exit code 0 => no installation necessary
# exit code 1 => installation necessary

Does such a command exist today?

Please note that I am aware of this issue and PR:

If I understand correctly, the latter suggests that such a command may be available soon.

@rami3l
Copy link
Member

rami3l commented Aug 20, 2024

@smoelius Thanks for filing this issue! I think you're getting it right.

We don't have a specific command for this test, but starting from #3985, if the active toolchain is not installed, using it via any command will result in an error and a suggestion of actually installing it.

You may use rustc --version for this purpose, for example, as demonstrated in the PR's description.

Do you happen to have other concerns in this regard?

@smoelius
Copy link
Contributor Author

@rami3l Thank you for your response.

We don't have a specific command for this test, but starting from #3985, if the active toolchain is not installed, using it via any command will result in an error and a suggestion of actually installing it.

Just to be sure I understand, this functionality is not yet released, correct?

@rami3l
Copy link
Member

rami3l commented Aug 20, 2024

@smoelius Not at the moment, but we do have plans to ship it soon. See #3998.

@smoelius
Copy link
Contributor Author

Thanks very much for your help, @rami3l.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants