如果我将 Grunt Task Runner 与 grunt-shell 一起使用,我无法使用 ctrl-c [SIGINT] 退出 grunt。
grunt.registerTask('serve', [
'less',
'autoprefixer',
'shell:hologram', // grunt-shell task
'connect:livereload',
'watch'
]);
下面是 shell 的配置方式:
grunt.initConfig({
...
shell: {
options: {
failOnError: false
},
hologram: {
command: 'bundle exec hologram'
},
},
...
}
最佳答案
当我从 Git Bash 运行 Grunt 时,我遇到了同样的问题。我的解决方案是更新到最新版本的 git bash 并退出 CTRL+SHIFT+C .
很有可能是 CTRL+SHIFT+C 就足够了(即使是旧版本)。
关于gruntjs - ctrl-c [SIGINT] 在使用 grunt-shell 时不与 Grunt 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26244827/