【问题标题】:Task with 'runner' not working as expected in VS Code带有“runner”的任务在 VS Code 中没有按预期工作
【发布时间】:2017-06-20 15:29:00
【问题描述】:

在 VS Code 1.13.1 中,在 Windows Creator Update 中运行,我在 tasks.json 中定义了这个任务:

{
    "version": "0.1.0",
    "runner": "terminal",
    "command": "echo",
    "isShellCommand": true,
    "args": ["Hello world"],
    "showOutput": "always"
}

当我运行任务时,我在集成终端中看到此消息:

终端将被任务重用,按任意键关闭它。

但我没有看到“Hello world”。为什么?

【问题讨论】:

  • 奇怪,这对我来说很好用(相同的 VSCode 和 Windows 版本)...i.imgur.com/ZxJxtlm.png
  • 绝对不适合我。

标签: visual-studio-code


【解决方案1】:

我不知道你是否解决了它,但我遇到了同样的问题,直到我将 settings.json 上的终端从

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\cmd.exe"

如果您的 settings.json 文件没有这一行,您可以添加并查看问题是否消失。

【讨论】:

    猜你喜欢
    • 2020-05-13
    • 1970-01-01
    • 1970-01-01
    • 2020-05-05
    • 2010-10-08
    • 2020-11-28
    • 1970-01-01
    • 2014-01-26
    • 1970-01-01
    相关资源
    最近更新 更多