简体   繁体   English

VS Code Windows 中不存在终端 shell 路径“..\\..\\..\\vsCode\\git\\bin\\bash.exe”

[英]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.

相关问题 尝试将 BASH 安装到 VSCode 时无法编辑用户设置。 “terminal.integrated.shell.windows”:“C:\\Program Files\\Git\\bin\\bash.exe”, - Unable to edit user settings when trying to install BASH into VSCode. “terminal.integrated.shell.windows”: “C:\\Program Files\\Git\\bin\\bash.exe”, 为什么终端.integrated.shell.windows 路径的 VS 代码出现错误? - Why am I getting an error in VS code for the terminal.integrated.shell.windows path? Vscode 运行时出现调试器错误“启动程序 *文件/路径* 不存在” - Vscode Run with debugger error "Launch program *file/path* does not exist 使用Anaconda Prompt和Git Bash设置VSCode的Shell Launcher Extension时出错 - Errors when setting up Shell Launcher Extension for VSCode with Anaconda Prompt and Git Bash 在 Windows 10 VS Code 上为 C++ 设置 tasks.json 和 c_cpp_properties.json 后如何修复“/bin/bash: [command] command not found”? - How to fix "/bin/bash: [command] command not found" after setting up tasks.json and c_cpp_properties.json for C++ on Windows 10 VS Code? 将 XAMPP shell 添加到新的“Windows 终端” - Add XAMPP shell to new 'Windows Terminal' VS Code 中的外部终端调试器 - External Terminal Debugger in VS Code 为什么 VS Code 允许 JSON 文件中的注释在 .vscode 中而不是其他地方? - Why does VS Code allow comments in JSON files within .vscode but not elsewhere? 如何在Windows的Git bash上添加文件 - How to add files on Git bash on windows 如何在 VS CODE 中的终端选项卡之间切换? - how to switch between terminal tabs in VS CODE?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM