Skip to content

Command to tell whether download/install is necessary #4000

Closed

Description

@smoelius

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.

Activity

  1. rami3l commented on Aug 20, 2024

    @rami3l
    Member

    @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?

  2. smoelius commented on Aug 20, 2024

    @smoelius
    ContributorAuthor

    @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?

  3. rami3l commented on Aug 20, 2024

    @rami3l
    Member

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

  4. smoelius commented on Aug 20, 2024

    @smoelius
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions