使用grunt-notify时,为什么从growl获取错误代码?

时间:2015-05-07 08:15:26

标签: javascript node.js gruntjs growl-for-windows grunt-notify

我安装了grunt-notify来获取桌面上的消息。

这是Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    notify: {
      test: {
        options: {
          message: "YO"
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-notify');

  // simplified example
  grunt.registerTask('default', ['notify:test']);
};

grunt -v

上的控制台输出
E:\Temp>grunt -v
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "grunt-notify" local Npm module tasks.
Reading E:\Temp\node_modules\grunt-notify\package.json...OK
Parsing E:\Temp\node_modules\grunt-notify\package.json...OK
Loading "notify.js" tasks...OK
+ notify
Loading "notify_hooks.js" tasks...OK
+ notify_hooks
Loading "Gruntfile.js" tasks...OK
+ default

No tasks specified, running default tasks.
Running tasks: default

Running "default" task

Running "notify:test" (notify) task
Verifying property notify.test exists in config...OK
File: [no files]
Options: title="Temp", message="YO"
>> [grunt-notify] growl: C:\Utils\growlnotify\growlnotify.COM
>> [growl] cmd: growlnotify
>> [growl] args: /i:E:\Temp\node_modules\grunt-notify\images\grunt-logo.png  YO /t:Temp
>> [growl] return_code: 4294967295

Done, without errors.

我们可以看到return_code: 4294967295(-1转换为无符号的32位值)。 。

如果我手动执行以下命令行:E:\Temp>growlnotify /i:E:\Temp\node_modules\grunt-notify\images\grunt-logo.png YO /t:Temp

我收到了消息(没有徽标):

Growl message

那么,为什么我在通过grunt-notify传递时会收到错误代码,而不是在手动线路命令上?

注意:我正在使用Windows 7专业版

编辑:关注此问题后:https://github.com/dylang/grunt-notify/issues/91,我成功使用命令行获取图像:

C:\temp>growlnotify /i:"C:/temp/node_modules/grunt-notify/images/grunt-logo.png"  "YO" /t:temp

但仍然无法通过咕噜声......

0 个答案:

没有答案