visual-studio-code - 如何让语言特定命令在 VSCode 中工作?
问题描述
我是 Visual Studio Code 的新手,我正在尝试在终端中运行命令来处理我的项目。我将默认终端更改为 Git Bash,但这不起作用。当我运行特定命令时,我得到错误。以下是 Ruby 的示例:
$ bundle install
bash: bundle: command not found
每当我尝试运行 ruby/rails 命令时都会发生这种情况。我使用的是 Windows,是否需要编辑特定设置才能修复此问题?
解决方案
将此添加到您的 VSCodesettings.json
文件中
"terminal.integrated.shell.windows": "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["--login", "-i"]
推荐阅读
- javascript - 为什么这些嵌套的 forEach 循环的行为是这样的?
- yii2 - 如何在 yii2 Yii:t() 中使用位置占位符;
- android - Android - Get text from one textView and set to another with Android Data Binding
- java - 为什么 songName[i]!= null 在它应该是 F 的时候评估为 T
- javascript - 添加到 D3 条形图的最后一个元素未排序
- webpack - Webpack 4:hash 和 contenthash 和 chunkhash,什么时候用哪个?
- flutter - Navigator 在 Flutter 的底部导航栏中重建父页面和目标页面
- reactjs - 反应路由器发送带有参数的 URL
- mongodb - mongodb服务没有启动
- geoserver - 地理服务器使用 EPSG3857(墨卡托投影)发布 worldImage(png 文件)栅格数据