-
Notifications
You must be signed in to change notification settings - Fork 893
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
Fallbacks to wget if curl not installed #1373
Conversation
modify 'rustup-init.sh' to support wget if curl not installed. This situation often happens on some linux distribution.
@titansnow I slightly modified your version to avoid duplication of |
Looks good 😄 |
Looks good to me. r? @alexcrichton |
@bors: r+ |
📌 Commit faa08bd has been approved by |
Fallbacks to wget if curl not installed Tested in ubuntu docker with 1. Both curl and wget installed 2. only wget installed 3. only curl installed Console output for wget looks like this : ```shell root@845dcc4ba103:/# wget -qO- https://raw.githubusercontent.com/thibaultdelor/rustup.rs/faa08bd786b7282500cc4162a2f428484c891130/rustup-init.sh | sh info: downloading installer --2018-03-08 06:54:27-- https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init Resolving static.rust-lang.org (static.rust-lang.org)... 54.230.135.47, 54.230.135.132, 54.230.135.130, ... Connecting to static.rust-lang.org (static.rust-lang.org)|54.230.135.47|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 12984456 (12M) [application/x-sharedlib] Saving to: '/tmp/tmp.DQhaNqhC4q/rustup-init' /tmp/tmp.DQhaNqhC4q/rustu 100%[==================================>] 12.38M 11.0MB/s in 1.1s 2018-03-08 06:54:29 (11.0 MB/s) - '/tmp/tmp.DQhaNqhC4q/rustup-init' saved [12984456/12984456] Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at: /root/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile file located at: /root/.profile You can uninstall at any time with rustup self uninstall and these changes will be reverted. Current installation options: default host triple: x86_64-unknown-linux-gnu default toolchain: stable modify PATH variable: yes 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation ```
☀️ Test successful - status-appveyor, status-travis |
Fallbacks to wget if curl not installed Tested in ubuntu docker with 1. Both curl and wget installed 2. only wget installed 3. only curl installed Console output for wget looks like this : ```shell root@845dcc4ba103:/# wget -qO- https://raw.githubusercontent.com/thibaultdelor/rustup.rs/ba8e1a8988c00a3f7a2e5ddc4b2a4959bc071b8c/rustup-init.sh | sh info: downloading installer --2018-03-08 06:54:27-- https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init Resolving static.rust-lang.org (static.rust-lang.org)... 54.230.135.47, 54.230.135.132, 54.230.135.130, ... Connecting to static.rust-lang.org (static.rust-lang.org)|54.230.135.47|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 12984456 (12M) [application/x-sharedlib] Saving to: '/tmp/tmp.DQhaNqhC4q/rustup-init' /tmp/tmp.DQhaNqhC4q/rustu 100%[==================================>] 12.38M 11.0MB/s in 1.1s 2018-03-08 06:54:29 (11.0 MB/s) - '/tmp/tmp.DQhaNqhC4q/rustup-init' saved [12984456/12984456] Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at: /root/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile file located at: /root/.profile You can uninstall at any time with rustup self uninstall and these changes will be reverted. Current installation options: default host triple: x86_64-unknown-linux-gnu default toolchain: stable modify PATH variable: yes 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation ```
Tested in ubuntu docker with
Console output for wget looks like this :