powershell - 如何仅在 vscode 中在 powershell 中运行特定任务
问题描述
我在 Windows 10 上,我在 vscode 中的默认 shell 是 git bash,它被所有任务使用。
对于特定任务,我想使用 powershell。这可能吗
{
"label": "sometask",
"type": "shell",
"command": "sam build",
"group": "test"
}
解决方案
对于以下工作。
https://code.visualstudio.com/docs/editor/tasks#_common-questions
{
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/d", "/c"
]
}
}
},
...
推荐阅读
- vue.js - Vue-MultiSelect:在选择事件期间似乎无法从对象获取属性
- python-3.x - gRPC:如何结合静态和流参数调用远程过程?
- python - 在 5x5 正方形内生成随机三角形并绘制它们
- python - 增强分配
- python - IBM Cloud Object Storage Connection 问题 Watson Studio Python 笔记本
- html - 如何使用 ELECTRON 从渲染器 JS 加载 html
- javascript - 如何在对象数组中添加、更新、删除和搜索对象
- c# - SqlDataAdapter 对象 CommandTimeOut 在 C# 中不起作用
- python - 通过 defaultdict 收集索引的问题
- python - 如何在使用 pytest 调用的另一种方法中模拟函数