microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.64k stars 29.04k forks source link

CLI command `code` in path, but not working in git bash #156427

Closed KyleMit closed 2 years ago

KyleMit commented 2 years ago

Issue Type: Bug

VS Code is definitely in the path (can find it with which code), but doesn't produce any output when calling code --version in git bash

git broken

It does however work just fine in Powershell.

powershell working

I'm not quite sure if this is something with my local bash environment, but it's a common enough prompt that other users might be running into it as well

VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
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| |Load (avg)|undefined| |Memory (System)|63.75GB (45.16GB free)| |Process Argv|--crash-reporter-id e3d2dc58-ab34-433d-a419-13fa96751c88| |Screen Reader|no| |VM|0%|
Extensions (89) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.0.0 codesnap|adp|1.3.4 Bookmarks|ale|13.3.1 astro-vscode|ast|0.20.2 markdown-yaml-preamble|bie|0.1.0 vscode-intelephense-client|bme|1.8.2 better-toml|bun|0.3.2 toggle-format-on-save|cbr|0.2.0 npm-intellisense|chr|1.4.2 path-intellisense|chr|2.8.1 coddx-alpha|cod|0.3.1 vscode-svgviewer|css|2.0.0 vscode-markdownlint|Dav|0.47.0 jshint|dba|0.11.0 vscode-eslint|dba|2.2.6 apt-source-list-syntax|dei|0.1.6 xml|Dot|2.5.1 gitlens|eam|12.1.2 vscode-npm-script|eg2|0.3.28 prettier-vscode|esb|9.5.0 nunjucks-template|ese|0.5.1 vscode-reveal|evi|4.3.3 vs-code-xml-format|fab|0.1.5 vscode-open-in-github|fab|1.3.0 vscode-open-multiple-files|fab|1.4.0 vscode-jest-runner|fir|0.4.48 flow-for-vscode|flo|2.2.0 codespaces|Git|1.9.4 remotehub|Git|0.38.0 vscode-pull-request-github|Git|0.46.1 vscode-graphql|Gra|0.6.0 beautify|Hoo|1.5.0 rest-client|hum|0.25.0 path-autocomplete|ion|1.19.1 reg|ion|1.1.0 search-editor-apply-changes|jak|0.1.1 bikeshed|kai|0.0.1 ts-debug|kak|0.0.6 vscode-github|Kni|0.30.7 vs-utils|Kyl|0.1.4 paste-to-markdown|lee|0.0.1 sln-support|log|0.0.1 yarn-lock-syntax|mar|0.1.3 markdown-shortcuts|mdi|0.12.0 rainbow-csv|mec|2.4.0 template-string-converter|meg|0.6.0 vscode-language-babel|mgm|0.0.36 git-graph|mhu|1.30.0 xml-format|mik|1.1.2 dotenv|mik|1.0.1 vscode-bicep|ms-|0.8.9 vscode-docker|ms-|1.22.1 csharp|ms-|1.25.0 vscode-dotnet-runtime|ms-|1.5.0 python|ms-|2022.10.1 vscode-pylance|ms-|2022.7.40 jupyter|ms-|2022.6.1201981810 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.9 remote-containers|ms-|0.241.3 remote-wsl|ms-|0.66.3 azure-account|ms-|0.11.0 powershell|ms-|2022.6.3 remote-repositories|ms-|0.16.0 vscode-typescript-tslint-plugin|ms-|1.3.4 vsliveshare|ms-|1.0.5663 azurerm-vscode-tools|msa|0.15.7 debugger-for-chrome|msj|4.13.0 color-highlight|nau|2.5.0 vetur|oct|0.35.0 vscode-commons|red|0.0.6 vscode-xml|red|0.21.2022062916 vscode-yaml|red|1.9.1 postcss|ric|2.0.0 vscode-sort-json|ric|1.20.0 LiveServer|rit|5.7.5 kuskus-kusto-language-server|ros|1.0.26 bash-beautify|sha|0.1.1 markdown-preview-enhanced|shd|0.6.3 vscode-autohotkey|sle|0.2.2 code-spell-checker|str|2.3.2 sass-indented|syl|1.8.22 open-in-browser|tec|2.0.0 vscode-markdown-paste-image|tel|0.19.1 vscode-conventional-commits|viv|1.24.1 vscode-icons|vsc|11.13.0 codetour|vsl|0.0.58 markdown-all-in-one|yzh|3.4.3 html-css-class-completion|Zig|1.20.0 (2 theme extensions excluded)
KyleMit commented 2 years ago

Can be marked as closed was fixed by uninstalling and re-installing git (which comes with git bash)