Skip to content
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

VS Code Git isn't run from active environment #175756

Closed
isaac-hazy opened this issue Mar 1, 2023 · 1 comment
Closed

VS Code Git isn't run from active environment #175756

isaac-hazy opened this issue Mar 1, 2023 · 1 comment
Assignees

Comments

@isaac-hazy
Copy link

Type: Bug

My setup:

  • Git pre-commit-hook scripts that use the black formatter
  • Black formatter tool is installed in my conda environment only
  • VSCode is set to use my conda environment (black works on save, python plugin works fine, etc)
  • I can Git stage changes from VS Code but I get a failure running black if I git commit from VS Code
  • Git Commit works fine from command line

My theory is that Git within VS Code isn't being run from within the conda environment so black isn't found. I think that if you set a venv/conda env in VS Code it should apply to everything including Git commands.

VS Code version: Code 1.75.1 (441438a, 2023-02-08T21:34:01.965Z)
OS version: Darwin arm64 22.3.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Apple M1 Pro (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 3, 3, 2
Memory (System) 32.00GB (1.95GB free)
Process Argv --crash-reporter-id 10857c65-fad9-4b62-8ea0-bd59e11d959c
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
rainbow-csv mec 3.5.0
vscode-docker ms- 1.24.0
isort ms- 2022.8.0
python ms- 2023.2.0
vscode-pylance ms- 2023.2.40
jupyter ms- 2023.1.2010391206
jupyter-keymap ms- 1.1.0
jupyter-renderers ms- 1.0.14
vscode-jupyter-cell-tags ms- 0.1.6
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.275.1
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewvextcfv2:30669238
azure-dev_surveyone:30548225
pyindex848:30662994
nodejswelcome1cf:30587006
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
vsccsb:30662443
funwalk2cf:30671525

@lszomoru
Copy link
Member

Closing as duplicate of microsoft/vscode-python#10165.

@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants