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

Don't newly create .bash_profile #105

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

tats-u
Copy link
Contributor

@tats-u tats-u commented Nov 11, 2024

Fixes #99

I don't know how to test the new behavior in WSL

echo $'#!/bin/sh\necho OK' > ~/.local/bin/env-test && chmod +x ~/.local/bin/env-test
# Modify profile using starbase
PATH="$(getconf PATH)" sh -lc env-test

@tats-u tats-u marked this pull request as ready for review November 11, 2024 14:19
@milesj milesj self-assigned this Nov 12, 2024
@milesj
Copy link
Collaborator

milesj commented Nov 12, 2024

Thanks! Will merge through the errors since they are unrelated.

@milesj milesj merged commit 3de0db5 into moonrepo:master Nov 12, 2024
8 of 10 checks passed
@tats-u tats-u deleted the no-new-bash-profile branch November 12, 2024 11:07
@tats-u
Copy link
Contributor Author

tats-u commented Nov 18, 2024

@milesj

https://github.com/moonrepo/proto/blob/9f47f9d60c9d7f74b38bfc96ced8be1e012422fb/crates/cli/src/shell.rs#L32

Check in reverse order as the most common profile is always last in the list

https://github.com/moonrepo/proto/blob/9f47f9d60c9d7f74b38bfc96ced8be1e012422fb/crates/cli/src/shell.rs#L128-L133

Really? I thought the first is the most preferred one...

image

Is it why .bashrc is inappropriately suggested first here (proto setup)?

@tats-u
Copy link
Contributor Author

tats-u commented Nov 18, 2024

the most common profile is always last in the list

If so, I wonder why .bash_profile here comes first here.

vec![
home_dir.join(".bash_profile"),
home_dir.join(".bashrc"),
home_dir.join(".profile"),
]

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

Successfully merging this pull request may close these issues.

Don't newly create .bash_profile
2 participants