Skip to content

Conda activation incorrect while using gitbash in windows  #3810

@joelcthomas

Description

@joelcthomas

Environment data

  • VS Code version: 1.30.1
  • Extension version (available under the Extensions sidebar): Python 2018.12.1
  • OS and version: Windows 10.0.17763
  • Python version (& distribution if applicable, e.g. Anaconda): python 3.6 using anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: NA

Expected behaviour

joel@xyz MINGW64 ~/Projects/vscode-python (master)
$ source activate py36
(py36)
joel@xyz MINGW64 ~/Projects/vscode-python (master)

Actual behaviour

While using gitbash as integrated terminal, conda activation doesn't work as expected as its using incorrect activation command
joel@xyz MINGW64 ~/Projects/vscode-python (master)
$ activate py36
joel@xyz MINGW64 ~/Projects/vscode-python (master)

Steps to reproduce:

  • Change default terminal to gitbash from 'Terminal > Integrated > Shell: Windows'
  • Close any existing open terminal in vscode
  • Ensure python interpreter is already selected (in above example, env name is py36)
  • Open integrated terminal
  • By default, it should activate conda environment by using command 'activate ' in Windows but need to use 'source activate ' if using bash/gitbash in Windows.

Probable Fix:

update condaActivationProvider to identify bash & gitbash ShellType in windows and send appropriate activate command
Note: I have tested required fix and would be happy send pull request.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions