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

Install script tells me to source a sh-style env file when run in fish #3251

Closed
lgarron opened this issue Mar 2, 2023 · 1 comment
Closed

Comments

@lgarron
Copy link

lgarron commented Mar 2, 2023

Problem

At the end of install, rustup helpfully tries to tell me:

To configure your current shell, run:
source "/Users/lgarron/.data/cargo/env"`

But my current shell is fish, and sourcing that file is going to be a bad time:

> source "/Users/lgarron/.data/cargo/env"
~/.data/cargo/env (line 4): 'case' builtin not inside of switch block
case ":${PATH}:" in
^~~^
from sourcing file ~/.data/cargo/env
source: Error while reading file '/Users/lgarron/.data/cargo/env'

Steps

  1. Open a fish terminal on the latest macOS.
  2. Run the command from https://rustup.rs/ (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)

Possible Solution(s)

  1. Don't tell me that something will configure my current shell, if it in fact does not?
  2. For maximum helpfulness, offer a fish-compatible env file that I can source.

Notes

No response

Rustup version

> rustup --version
rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.67.1 (d5a82bbd2 2023-02-07)


### Installed toolchains

```console
> rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/lgarron/.data/rustup

stable-aarch64-apple-darwin (default)
rustc 1.67.1 (d5a82bbd2 2023-02-07)
@lgarron lgarron added the bug label Mar 2, 2023
@lgarron lgarron changed the title Default Rustup command tells me to source a sh-style env file when run in fish Install script tells me to source a sh-style env file when run in fish Mar 2, 2023
@rbtcollins
Copy link
Contributor

It is an interesting idea to walk up the process tree / look for some indication that fish is in use and change our prompts. See also #478. That said, you are actually running the install in posix sh, not fish - thats what the curlsh pattern does. I'm going to duplicate all the fish bugs together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants