当前位置:   article > 正文

解决VScode缺少git bash的问题_failed to start bash - is git-bash.exe on the syst

failed to start bash - is git-bash.exe on the system path? vscode

效果

解决步骤

  1. 找到git安装目录下的/bin/bash.exe,复制其绝对路径,例如
    D:\Program Files\Git\bin\bash.exe
  2. 把路径的右斜杠转义,例如
    D:\\Program Files\\Git\\bin\\bash.exe
    其实就是一个斜杠变两个
  3. 在vscode中按F1,输入settings.json不要回车,选择“打开设置(json)”
  4. 按实际情况,修改为
    1. {
    2. "terminal.integrated.profiles.windows": {
    3. "PowerShell": {
    4. "source": "PowerShell",
    5. "icon": "terminal-powershell"
    6. },
    7. "Command Prompt": {
    8. "path": [
    9. "${env:windir}\\Sysnative\\cmd.exe",
    10. "${env:windir}\\System32\\cmd.exe"
    11. ],
    12. "args": [],
    13. "icon": "terminal-cmd"
    14. },
    15. "Git-Bash": {
    16. "path": "D:\\Program Files\\Git\\bin\\bash.exe",
    17. "args": []
    18. }
    19. },
    20. "workbench.colorTheme": "Default Light+",
    21. "workbench.startupEditor": "none",
    22. "files.autoSave": "afterDelay",
    23. "security.workspace.trust.untrustedFiles": "open"
    24. }

  5. 保存,ok!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/762961
推荐阅读
相关标签
  

闽ICP备14008679号