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

Ensure .bashrc is run? #172

Open
jhheider opened this issue Jul 27, 2023 · 6 comments
Open

Ensure .bashrc is run? #172

jhheider opened this issue Jul 27, 2023 · 6 comments

Comments

@jhheider
Copy link
Contributor

It seems like macOS bash doesn't read .bashrc out of .bash_profile by default: pkgxdev/pkgx#648

We should consider populating .bash_profile instead.

@jhheider
Copy link
Contributor Author

Ugh, no:
https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

login shells and non-login shells run a disjoint set of files, unless .bash_profile calls .bashrc specifically. It seems beyond our scope to ensure that. :/

@jhheider jhheider changed the title Populate .bash_profile Ensure .bashrc is run? Jul 27, 2023
@mxcl
Copy link
Member

mxcl commented Jul 27, 2023

we could add to both.

@jhheider
Copy link
Contributor Author

I considered briefly. Might be ok, if we have enough traps. Seems wrong to run twice for most configurations.

@jhheider
Copy link
Contributor Author

What a very weird and unlikable design choice.

@mxcl
Copy link
Member

mxcl commented Jul 27, 2023

all the tests I've tried suggest running twice is safe. But it is an extra ~100ms per tea instantiation until we are rust.

@jhheider
Copy link
Contributor Author

I mean, you can do:

  if [[ $TEA_HAS_RUN -ne 1 ]]; then
    tea --magic | do
    export TEA_HAS_RUN=1
  fi

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 a pull request may close this issue.

2 participants