运行vscode任务,包括失败

时间:2020-08-12 02:38:02

标签: bash visual-studio-code vscode-tasks

我创建了一个任务,该任务通过bash_unit运行一些单元测试。 bash单元脚本似乎因使用哪种而失败。 如果我替换:

CAT="$(which cat)"

以及其他在bash单元中指向我的本地命令的引用都运行良好。

如果我直接运行bash)单元,一切都很好,但是如果我将其作为vscode任务运行,它将失败。

我已将以下任务简化为最小的失败:

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "run which",
        "type": "shell",
        "command": "/usr/bin/which which",
        "problemMatcher": [],
        "group": "test",
    }
]

}

这将产生以下结果:

The terminal process "/bin/bash '-c', '/usr/bin/which which'" failed to launch (exit code: 1).

有什么想法吗?

0 个答案:

没有答案