7

如果我将 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'
    },
  },

...

}
4

1 回答 1

0

当我从 Git Bash 运行 Grunt 时,我遇到了同样的问题。我的解决方案是更新到最新版本的 git bash 并使用CTRL+SHIFT+C退出。很可能CTRL+SHIFT+C就足够了(即使是旧版本)。

于 2018-12-29T01:00:45.317 回答