-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
-bash: tea: command not found #648
Comments
What is your If that's not at issue, check your ~/.bashrc to see if the If you're on bash 4, have the correct magic, and you still don't locate |
Hi @jhheider, thank you for the response! It turned out that I did indeed have bash 3. However, upgrading to bash 5 did not resolve the problem (though the example code you provided did work correctly: I discovered that I also needed to add the following code to my .bash_profile:
I can now run the commands in my original message, both with and without prepending Perhaps both of these steps would have been more obvious to a more experienced developer, and I certainly am not sure to what extent it is In any case, thank you for the help! |
Interesting. I've never seen an install where .bashrc sourcing isn't default. Does bash 3 work (more) with the proper source line in .bash_profile? What OS is this? The .bashrc thing is strange. |
My macOS is 13.4.1 (c) (22F770820d) My understanding of this may have gaps. However, as I understand it on a macOS system, when you open a new terminal (which by default is using Bash as the shell), the shell reads and executes the .bash_profile file. The .bashrc file is not read by default. Therefore, to automatically source the .bashrc, you must add the line discussed above to the .bash_profile: In your experience, is this line typically present in a .bash_profile? Is this line typically added by default (by some shell or other entity on macOS)? Also, in regards to your question with bash 3, I changed by shell back to bash 3 and ran the following code:
It appears that it does work with bash 3, and that the issue was that my .bashrc was not being sourced. I noticed right before upgrading to bash 5 that I actually did not possess a .bashrc file. The .bashrc file was created upon upgrading my bash, and tea appeared to correct insert the magic line within it when I installed it after this upgrade. Not sure what role this information plays, if any, about my particular situation. |
Interesting. So, we should possibly be populating the .bash_profile instead. Since Catalina, the default configured shell on macOS is supposed to be |
For the current approach, are you checking what SHELL the user is using, and then choosing to place the magic line in .bashrc if My current understanding is the following: On the other hand, when you open a new terminal window with Zsh (the default as of macOS Catalina), it's also a login shell but it reads and executes both .zprofile and .zshrc. |
Yes, we were only decorating the current shell, but that is migrating to looking for all shell configs. It sounds like we should use .bash_profile instead of .bashrc. |
hm, actually: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html The bash manual says the files invoked are non-overlapping. It's "typical" for .bash_profile to invoke .bashrc, for exactly this reason. It might be that we should instead check .bash_profile invokes .bashrc, or issue some kind of notice/warning. This isn't as simple as expected. |
Need to consider the best approach here. At best, if your .bash_profile isn't invoking your .bashrc it seems like a misconfiguration, according to the GNU Bash manual. Solving it might be beyond |
v1 invokes in both (which is currently slow (not too bad), but we will speed it up). We also changed the generally suggested invocations to |
I've run the command:
sh <(curl https://tea.xyz)
I accepted the installation for tea and the setup for tea magic. After doing so, I tried running the example commands:
wget -qO- tea.xyz/white-paper | glow -
and
node --eval 'console.log("node: hello world")'
Neither of these commands worked. I tried rerunning them prepended with
tea
, but I received the error in this issue's title, namely:-bash: tea: command not found
I have tried closing and opening new terminals, and have rerun the
sh <(curl https://tea.xyz)
command. The command re-asks if I want to install, but does not re-ask if I want setup the tea magic -- it just says "you’re all set!", followed by the wget command that I referenced above.The text was updated successfully, but these errors were encountered: