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

[cargo.sh] Auto-install toolchains and components #577

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Oct 31, 2023

cargo.sh detects missing Rust toolchains and the rust-src component. When missing, it offers to install them automatically via rustup.

@joshlf joshlf requested a review from jswrenn October 31, 2023 20:33
@joshlf joshlf force-pushed the cargo-sh-install-toolchain branch 2 times, most recently from d39b416 to a9c1e47 Compare October 31, 2023 20:43
@joshlf joshlf linked an issue Oct 31, 2023 that may be closed by this pull request
Copy link
Collaborator

@jswrenn jswrenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also just simply do:

rustup toolchain install $TOOLCHAIN -c rust-src

If the toolchain isn't installed, it installs it. If the component isn't installed, it installs it. If the toolchain and component are installed, it does nothing.

@joshlf
Copy link
Member Author

joshlf commented Oct 31, 2023

You can also just simply do:

rustup toolchain install $TOOLCHAIN -c rust-src

If the toolchain isn't installed, it installs it. If the component isn't installed, it installs it. If the toolchain and component are installed, it does nothing.

I'm not sure we should install without user confirmation. Is there a way to have rustup confirm first?

@joshlf
Copy link
Member Author

joshlf commented Oct 31, 2023

You can also just simply do:

rustup toolchain install $TOOLCHAIN -c rust-src

If the toolchain isn't installed, it installs it. If the component isn't installed, it installs it. If the toolchain and component are installed, it does nothing.

I'm not sure we should install without user confirmation. Is there a way to have rustup confirm first?

Discussed offline; this still allows us to simplify the code even while prompting the user.

`cargo.sh` detects missing Rust toolchains and the `rust-src` component.
When missing, it offers to install them automatically via `rustup`.

Closes #564
@joshlf joshlf added this pull request to the merge queue Oct 31, 2023
Merged via the queue into main with commit 011688c Oct 31, 2023
126 checks passed
@joshlf joshlf deleted the cargo-sh-install-toolchain branch October 31, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cargo.sh] Ensure correct toolchain and components
2 participants