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

Custom and interactive install #293

Merged
merged 5 commits into from
Apr 17, 2016
Merged

Custom and interactive install #293

merged 5 commits into from
Apr 17, 2016

Conversation

brson
Copy link
Contributor

@brson brson commented Apr 10, 2016

This does a few things to make installation customizable.

The --no-modify-path flag disables PATH modification. rustup-setup.sh passes its arguments to rustup-setup.exe.

During the default interactive installation you can press "a" to enter "advanced installation", which just asks you the values of the two things that can be configured (path modification and default toolchain). We need this feature because it's the only way to change the installation options without finding out the command line options and starting installation over.

Here's what it looks like in action.

It could be a lot nicer still, but this is all the features I expect.

Fixes #271, #170.

@alexcrichton
Copy link
Member

Sounds/looks good to me! Looks like tests are failing but otherwise r=me

@brson
Copy link
Contributor Author

brson commented Apr 15, 2016

@bors r=alexcrichton

@brson
Copy link
Contributor Author

brson commented Apr 16, 2016

@bors r=alexcrichton

brson added 5 commits April 16, 2016 16:35
Add `confirm_advanced` and `advanced_install` functions.
This allows users to change --no-modify-path and --default-toolchain
from the interactive cli installer.

A typical session looks like

```
... snip ...

To cancel installation, type "n", or for more options type "a",
then press the Enter key to continue.

Press the Enter key to install Rust.
a

Selected installation options:

     default toolchain: stable
  modify PATH variable: yes

I'm going to ask you the value of each these installation options.
You may simply press the Enter key to accept the default.

Default toolchain? (stable/beta/nightly)
nightly

Modify PATH variable? (y/n)
n

That's it! We're ready to install Rust.

Selected installation options:

     default toolchain: nightly
  modify PATH variable: no

To cancel installation, type "n", or for more options type "a",
then press the Enter key to continue.

Press the Enter key to install Rust.

info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly'

  nightly unchanged - rustc 1.9.0-nightly (177905703 2016-04-08)

Rust is installed now. Great!

To get started you need Cargo's bin directory in your `PATH`
environment variable.

To configure your current shell run `source /home/brian/dev/.cargo/env`.
```
@brson brson merged commit 5b88ec2 into rust-lang:master Apr 17, 2016
@Victorcccc
Copy link

WeChat458edc9004ecb32ae2f1dd678ee97d51

what kind of process i could install rust ?

@kinnison
Copy link
Contributor

@Victorcccc That image shows several issues. The first is that you've given an invalid value for profile which will result in installation later down the line. The examples given (minimal/default/complete) are the valid values there, and I'd strongly recommend leaving it at default unless you have good reason to change it. As for the error you hilighted, it suggests that your .bash_profile is a directory rather than a file, which rustup certainly isn't expecting. If you have some unusual setup for your shell configurations then I suggest you set it to not modify PATH itself, and deal with that afterwards in whatever manner your personal configurations require. If you continue to have problems, then filing a fresh issue, rather than replying to a pull request from almost four years ago would be more sensible.

Good luck, I hope you manage to resolve your installation problem, and welcome to Rust.

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.

Change configuration during interactive install
4 participants