【发布时间】:2021-06-09 14:22:12
【问题描述】:
我配置了tasks.json 来构建和运行应用程序。
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "make"
},
{
"label": "close the file",
"type": "shell",
"command": "somecommand"
},
{
"label": "Run build",
"dependsOn": [
"build",
"close the file"
],
"dependsOrder": "sequence",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
流程首先执行make 命令,然后执行somecommand。问题是有时make 命令返回的退出代码不是零,因为somecommand 没有执行。有什么办法可以忽略之前的构建状态,一直执行somecommand?
【问题讨论】:
-
编写一个 shell 脚本并用一个任务运行它
-
@rioV8,是的,我现在正在这样做。但是还有其他方法可以解决这个问题吗?
标签: visual-studio-code vscode-settings vscode-tasks