Terminal not sourcing ~/.bash_profile

Answered

> PyCharm 2016.3
> Build #PY-163.8233.8, built on November 22, 2016
> Licensed to
> Subscription is active until
> JRE: 1.8.0_112-release-408-b2 x86_64
> JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I'm having an issue after upgrading from 2013.2 where terminal no longer sources my ~/.bash_profile.  It seems to default to /bin/bash but without sourcing the rc. 

Not sure how to give details on reproducing but the essential of it is,

  1. In 2016.2 open terminal within pycharm, should resemble my Terminal or iTerm application shell, ie sourcing my bashrc
  2. Upgrade to 2016.3
  3. Open terminal within pycharm, now gives the default prompt, ie ` bash-3.2$ `

Looking a little more into it, it seems it might have to do with virtualenv? but I'm not sure

 

38 comments
Comment actions Permalink

.iterm2_shell_integration.bash (12 kb)

0
Comment actions Permalink

Are you sure the file is uploaded? I do not see it on the server.

0
Comment actions Permalink

I can't actually see the server contents. The FTP link doesn't work for me, and the HTTP link printed that text after it uploaded the file. Same as with the zip file. I have no way to verify it actually uploaded, though.

0
Comment actions Permalink

Sorry if this sounds dumb, but I uploaded the file as is, and it's normally hidden. Did you account for that?

0
Comment actions Permalink

Please try to re-install iTerm2 shell integration according to https://www.iterm2.com/documentation-shell-integration.html. Will it help? If yes, please follow https://youtrack.jetbrains.com/issue/IDEA-206721for updates.

0
Comment actions Permalink

Okay, I installed iTerm2 shell integration and the prompt is fixed. However, the .bashrc is definitely still running twice.

I've commented on that ticket and will watch it from now.

0
Comment actions Permalink

I was experiencing this issue as well. Turned out that things stopped working after I switched to ZSh. Added a line to source .bash_profile in the

.zshrc found in the home dir fixed the issue.

0
Comment actions Permalink

Syed Wasim Ali, ~/.bash_profile should not be sourced if zsh is configured as shell.

0

Please sign in to leave a comment.