[英]The terminal shell path "..\..\..\vsCode\git\bin\bash.exe" does not exist in VS Code Windows
I am trying to set a portable development Environment:我正在尝试设置一个可移植的开发环境:
VS Code - Portable mode git-bash - portable Node.js - portable VS Code - 便携模式 git-bash - 便携 Node.js - 便携
VS Code throws Error: The terminal shell path "......\\vsCode\\git\\bin\\bash.exe" does not exist VS Code 抛出错误:终端 shell 路径“......\\vsCode\\git\\bin\\bash.exe”不存在
I have C:......\\Documents\\Storage\\vsCode\\data\\user-data\\User\\settings.json and C:......\\Documents\\Storage\\vsCode\\git\\bin\\bash.exe我有 C:......\\Documents\\Storage\\vsCode\\data\\user-data\\User\\settings.json 和 C:......\\Documents\\Storage\\vsCode\\git\\bin\\bash。可执行程序
settings.json:设置.json:
{
// Git Bash
"terminal.integrated.shell.windows": "..\\..\\..\\vsCode\\git\\bin \\bash.exe"
}
It works in CMD:它在 CMD 中工作:
C:\.........>cd C:\...........\Documents\Storage\vsCode\data\user-data\User
C:\.......\Documents\Storage\vsCode\data\user-data\User>cd ..\..\..\git\bin\
C:\.......\Documents\Storage\vsCode\git\bin>
Can you guide me how to deal with relative path in VS Code without setting global variables in the operating system.你能指导我如何在 VS Code 中处理相对路径而不在操作系统中设置全局变量吗? I will need to do the same thing with Node.我需要对 Node.js 做同样的事情。
Sorry for the messy post but I am fairly new to posting here.很抱歉这篇乱七八糟的帖子,但我对在这里发帖还很陌生。
I searched for "shell path" in the VS Code settings and noticed that the path was wrong ( Program Files instead of Program Files (x86) )我在 VS Code 设置中搜索了“shell 路径”,发现路径是错误的( Program Files而不是Program Files (x86) )
I had to change it to我不得不把它改成
"terminal.integrated.shell.windows": "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
You can follow below link : https://code.visualstudio.com/docs/editor/integrated-terminal您可以按照以下链接: https : //code.visualstudio.com/docs/editor/integrated-terminal
You need to edit the terminal integrated path in settings.json file to which ever thing you want it to compile it with您需要将 settings.json 文件中的终端集成路径编辑为您希望它编译的任何内容
See the URL in the screenshot to find the location for settings.json file at my end:查看屏幕截图中的 URL 以在我的末尾找到 settings.json 文件的位置:
@Rhatalin thank you for the suggestion. @Rhatalin 谢谢你的建议。 I had the same issue on Windows 10. After updating below setting in settings.json (File -> Preferences -> Settings search for shell and choose Terminal-Integrated-Automation Shell: Windows -> Edit in settings.json) the issue was gone.我在 Windows 10 上遇到了同样的问题。更新 settings.json 中的以下设置后(文件 -> 首选项 -> 设置搜索外壳并选择终端集成自动化外壳:Windows -> 在 settings.json 中编辑)问题消失了.
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
After a Windows update, I got the same error.在 Windows 更新后,我遇到了同样的错误。 I had to add escape \\ characters to each backslash in the path to get it to work again.我必须向路径中的每个反斜杠添加转义 \\ 字符才能使其再次工作。 (check your path to make sure each single \\ is double \\) This works: "C:\\Program Files\\Git\\bin\\bash.exe" This does not work: "C:\\Program Files\\Git\\bin\\bash.exe" (检查您的路径以确保每个 \\ 都是双 \\) 这有效:“C:\\Program Files\\Git\\bin\\bash.exe” 这不起作用:“C:\\Program Files\\Git\\bin\\bash.exe”可执行程序”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.