I installed grunt-notify to get messages on desktop.
Here is the Gruntfile.js :
module.exports = function(grunt) {
grunt.initConfig({
notify: {
test: {
options: {
message: "YO"
}
}
}
});
grunt.loadNpmTasks('grunt-notify');
// simplified example
grunt.registerTask('default', ['notify:test']);
};
The console output on 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.
We can see a return_code: 4294967295
(-1 converted to unsigned 32-bit value). .
If I manually do the following command line : E:\Temp>growlnotify /i:E:\Temp\node_modules\grunt-notify\images\grunt-logo.png YO /t:Temp
I got the message (without the logo) :
So, why I got an error code when passing via grunt-notify, but not on a manual line command?
Note : I'm using Windows 7 Pro
Edit : after following this issue : https://github.com/dylang/grunt-notify/issues/91, I succeed to get the image with the command line :
C:\temp>growlnotify /i:"C:/temp/node_modules/grunt-notify/images/grunt-logo.png" "YO" /t:temp
But still doesn't work through grunt...