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
option to get build systems to use default shell #1734
Comments
so I found other people having the same issue and the shell was not added to their /etc/shells and csh was no performed I did both and all is working as expected in my terminal so maybe I just need to know how sublime reads which bash to use, is there some sublime specific variable I can export? thanks |
https://stackoverflow.com/a/33092219 this script works for me (all the others don't) but hopefully this could be made happen by default for all default built systems? launchctl getenv /usr/local/bin/bash thanks |
if I create a new build file like this but use any idea what is going on? |
You might want to try build 3127 or newer from https://www.sublimetext.com/3dev - the changelog shows:
more details on how ST does that here. |
ok I tried 3132 (actually just finally purchased) still gives the same error though :/ |
Further investigation shows that ST's |
ok thanks sounds like this could be the issue don't really want to though... any chance that this will get changed? or is this considered to be an edge case? thanks for the quick response! |
So to conclude, you want ST to use a different shell (bash 4 in Could you include your sample build file in the report? |
yes this is correct the default built scripts do give me this error
from https://github.com/sublimehq/Packages/blob/master/Ruby/Ruby.sublime-build
works fine (by which I mean: it does not give an error, I don't know if it actually uses bash4 or bash3) woking default options would be nice because they apply automatically and don't require changing 👍 |
We generally don't use the user's preferred shell for build systems because that will almost certainly lead to issues. Instead, on Linux and OS X we always run /bin/bash for consistency. It seems in this case perhaps your bash_profile or bashrc was trying to use bash features not supported by /bin/bash on your machine. I'm not sure there is an answer to this that won't break things for some users. |
sure
could there be an option to force it nevertheless? Building in bash 4 works great. I'm fine with /bin/bash being the default but there should a better option than temporally hacking sublime source the issue has quite a few views (2k) on your forum as well and the issue is also applicable for zsh users I guess if you would consider this option it would really be nice |
Is there any news/ opinion on that? |
It sounds like an enhancement request that can get added to the list the next time I work on build systems. |
If you want to have your system use /usr/local/bin/bash, try out https://packagecontrol.io/packages/PackageResourceViewer to properly override Default/exec.py with your edits. https://packagecontrol.io/packages/OverrideAudit can help you ensure you don't miss updates and bug fixes to exec.py in the future. |
I tried that already but it would not show any results on "exec.py" so I uninstalled it, now, if I open search through the installable Packages it won't even find (found out that TextMate has a feature to set a specific Path but well does not help much) |
S:trival ? is there still any chance getting this fixed? |
We haven't been working on build systems recently. Since this isn't a bug, but an enhancement, it will probably be bundled with some related work on build systems. |
ok, good to know it is in your list |
Build 3153 has the following change to fix this:
|
I still get
because of
but this is certainly MUCH better than before THANKS |
according to this sublime output reports to be "interactive" thus the if else on bash_profile does not work (strange thing is: ambiguous completion with the guarded profile does not work in normal terminal either) maybe there is an "easy" bash setting/ fix I'm just missing |
subl_var=`tty`
if [[ $subl_var != "not a tty" ]] ; then
bind 'set show-all-if-ambiguous on'
bind 'TAB:menu-complete'
bind -x '"\C-l": clear'
fi works and output is now perfectly clean and readable, nice! |
In case someone googles and find this, you can easily use a default shell by adding a custom "shell_environment": "/bin/zsh", |
Summary
when building java or ruby or c code I get errors (see actual behavior)
...
Expected behavior
no errors should be raised
...
Actual behavior
...
Steps to reproduce
things I have setup, that work correctly for themselves, but may be a source of the sublime issues
/usr/local/bin
to my path, because of home-brewmy best guess is that sublime is using the default bash 3 but bash 3 with my current bash_profile only gives me one error
__git_ps1: command not found
Environment
thanks for any help!
The text was updated successfully, but these errors were encountered: