sublime text 2控制台仅显示gruntjs输出的第一行

Kri*_*nck 5 windows console build sublimetext2 gruntjs

当在windows上的sublime text 2中运行grunt时,它似乎只显示输出的第一行.奇怪的是,所有任务都已完成.添加"shell": truefalse似乎没有任何影响.同样没有增加cmd /c,甚至start /wait /b.

如何阻止崇高文本吃剩下的输出?

// grunt.sublime-build
{
    "cmd": ["grunt.cmd", "--no-color", "--verbose"],
    "working_dir": "${project_path:${folder}}",
    "selector": ["source.js", "source.less", "source.json", "source.ts"],
    "shell": true
}
Run Code Online (Sandbox Code Playgroud)

我得到的唯一输出是:

Initializing
[Finished in 1.6s]
Run Code Online (Sandbox Code Playgroud)

更新 这似乎与Sublime Text 2 issue 23:Windows Build Panel Eats Stdout有关.

更新 有一个解决方法,但它很难看.

// grunt.sublime-build
{
    "cmd": ["grunt.cmd", "--no-color", ">", "c:\\temp\\st2.txt", "&&", "type", "c:\\temp\\st2.txt"],
    "working_dir": "${project_path:${folder}}",
    "selector": ["source.js", "source.less", "source.json", "source.ts"]
}
Run Code Online (Sandbox Code Playgroud)

i_l*_*ots 0

我编写了一个稍微简单的构建脚本,它将写入和删除当前目录中的临时文件:

{
    "cmd": ["grunt --no-color > grunt.status & type grunt.status && del grunt.status"],
    "working_dir": "${project_path}/assets/js/src",
    "shell": true
}
Run Code Online (Sandbox Code Playgroud)

来源: https: //gist.github.com/3951895