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.sh: prefer placing shellenv command in rcfile rather than shell profile on Linux #809

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

XuehaiPan
Copy link
Contributor

Prompt user to add shellenv command in their rcfile rather than the shell profile. The profile is only sourced by the login shell, while the rcfile is always sourced in an interactive session.

Resolves #808.

;;
*)
shell_profile="${HOME}/.profile"
shell_rcfile="${ENV:-"${HOME}/.profile"}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference for the ENV environment variable:

Stack Overflow: Is there an alternative for .bashrc for /bin/sh?

MikeMcQuaid
MikeMcQuaid previously approved these changes Sep 27, 2023
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me but will wait for one more @Homebrew/maintainers to agree.

@MikeMcQuaid
Copy link
Member

Thanks again @XuehaiPan!

@XuehaiPan XuehaiPan changed the title install.sh: prefer placing shellenv command in rcfile rather than shell profile install.sh: prefer placing shellenv command in rcfile rather than shell profile on Linux Oct 2, 2023
@MikeMcQuaid MikeMcQuaid requested a review from Bo98 October 2, 2023 13:22
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thanks again @XuehaiPan!

@MikeMcQuaid MikeMcQuaid merged commit 35c4946 into Homebrew:master Oct 6, 2023
3 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inaccurate post-install instructions
3 participants