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

Allow installing rustup without a toolchain (or allow specifying one) #559

Closed
shepmaster opened this issue Jul 3, 2016 · 5 comments
Closed

Comments

@shepmaster
Copy link
Member

I'm building some Docker containers and throwing Rust in there:

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

This will download and install stable Rust, but I need more control over which version gets installed. Specifically, I'd like to just install rustup, and then install a specific {stable,beta,nightly}-$DATE:

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-toolchains

I'd also be happy if I could pick a specific version straight-off:

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --toolchain=beta-1999-12-31

I'd be happy to contribute if you have a preferred solution and can give some general pointers as to where to look.

@shepmaster
Copy link
Member Author

My current workaround is to:

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN rustup default "stable-${date}"

Which uses twice the disk space due to #555.

@jimmycuadra
Copy link
Contributor

I have the same use case for Ruma's development environment. Not being able to pin a specific version of nightly Rust via rustup-init is causing us pain.

@jimmycuadra
Copy link
Contributor

Would allowing a specific toolchain be as simple as removing this line, or is there something else in the code that forces rustup-init to limit the initial toolchain to a channel name?

@brson
Copy link
Contributor

brson commented Jul 8, 2016

@jimmycuadra Yes, removing that line will allow arbitrary toolchains at install. If we do that though it will make it much easier to generate an error during install by selecting a bogus toolchain so the error handling will have to be considered. I'd be happy to take a patch that just removes that line for now.

The error handling when the default toolchain fails to install needs revisiting in general.

@ashWhiteHat
Copy link

I'd also be happy if I could pick a specific version straight-off:

You can with following command.

$ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2021-11-17

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

No branches or pull requests

4 participants