当我今天早上醒来并在启动时启动VSCode时,运行任务的时候是powershell,而不是Git。我在窗户上。我试着改变了settings.json,但没有结果。我遗漏了什么吗?
{
"workbench.startupEditor": "newUntitledFile",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"aws.samcli.location": "C:\\Users\\king\\AppData\\Roaming\\npm\\sam.exe",
"typescript.updateImportsOnFileMove.enabled": "always",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"explorer.confirmDragAndDrop": false,
"diffEditor.maxComputationTime": 0,
"extensions.ignoreRecommendations": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.renderControlCharacters": true,
"[jsonc]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
"window.zoomLevel": 0,
"editor.accessibilitySupport": "off",
"workbench.editor.untitled.hint": "hidden",
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",
"terminal.explorerKind": "external",
"terminal.integrated.automationShell.linux": ""
}
我发现这个相关SO做了默认的powershell,但是我没有看到任何关于我的setting...especially的不正确的地方,因为我的目标正好相反--停止Powershell!
发布于 2021-09-09 05:58:19
编辑:1
注意:现在这个bug已经被VSCode修复了。只需将VSCode更新为最新版本即可。(179-2021)
我有个暂时的解决办法。
首先将此代码粘贴到settings.json
中并保存
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
"C:\\Program Files\\Git\\bin\\bash.exe": {
"path": "",
"args": []
}
},
在关闭VSCode之前,选择Output
而不是Terminal
参考资料:VSCode突然默认为集成终端的PowerShell,而不是Windows中的$Bash
注:,这不是一个解决方案。我分享这个是因为也许它能让你免于失望。
这是我的第一篇文章,如果有任何错误,请让我知道,以便我可以纠正它。
发布于 2021-09-08 00:02:50
发布于 2021-09-09 06:18:09
我也有同样的问题,但是我尝试运行命令提示符。我通过添加到...\Code\User\settings.json来修复它
"terminal.integrated.automationShell.windows":"cmd.exe“
https://stackoverflow.com/questions/69047142
复制相似问题