Skip to content

Update post install message to show only the source methods that are relevant to your system.#4806

Open
ryankopf wants to merge 1 commit intorust-lang:mainfrom
ryankopf:main
Open

Update post install message to show only the source methods that are relevant to your system.#4806
ryankopf wants to merge 1 commit intorust-lang:mainfrom
ryankopf:main

Conversation

@ryankopf
Copy link
Copy Markdown

When installing Rust on a new system, you get this ugly block of text listing all the possible ways to source the cargo environment variables. However, we already detect which shells are available - so the message should show the ones that exist on the users system.

Instead of:

This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env"            # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish"  # For fish
source "~/.cargo/env.nu"  # For nushell
source "$HOME/.cargo/env.tcsh"  # For tcsh
. "$HOME/.cargo/env.ps1"        # For pwsh
source "$HOME/.cargo/env.xsh"   # For xonsh

If you have just bash and pwsh, for example, it will instead just show the relevant lines:

This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env"            # For bash
. "$HOME/.cargo/env.ps1"        # For pwsh

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.

1 participant