Vscode: .bash_profile not sourced in integrated terminal on mac

Created on 14 Jun 2016  路  9Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.2.1
  • OS Version: Mac OS X 10.11.5

Steps to Reproduce:

  1. Toggle open the integrated terminal from VS Code
  2. Notice that it has not sourced from .bash_profile as terminal does when opening a new window.

I have to run source ~/.bash_profile every time I open the integrated terminal the first time after starting code.

Perhaps I've missed documentation somewhere about how to have it always source the .bash_profile file?

Most helpful comment

More specifically, you should add this to your User Settings file, unless it works better for your Workspace Settings file.

{
    //... reduced for brevity
    "terminal.integrated.shellArgs.osx": [
        "-l"
    ]
}

All 9 comments

Looks like a duplicate of #7279 :)

Which is a duplicate of https://github.com/Microsoft/vscode/issues/7263 :stuck_out_tongue:

Closing, check that issue for workarounds until you can run bash as a login shell in 1.3.0.

I am still experiencing this issue in 1.5.2 in El Capitan. I had to source bash_profile everytime. I thought it was fixed in 1.3.0

@Abhi347 the fix is to specify the -l argument as shellArgs in your settings.json file

More specifically, you should add this to your User Settings file, unless it works better for your Workspace Settings file.

{
    //... reduced for brevity
    "terminal.integrated.shellArgs.osx": [
        "-l"
    ]
}

Just out of interest, @nabulsi, why the downvote?

Hi,
@carlsmith
That didn't fix my issue. This is what resolved my issue:
"terminal.integrated.shell.linux": "/bin/bash"

Ah. Sorry. That makes sense.

@nabulsi You don't seem to be on OSX. Read the title of this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirius1024 picture sirius1024  路  3Comments

curtw picture curtw  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

trstringer picture trstringer  路  3Comments

trstringer picture trstringer  路  3Comments