Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

No notification appears on Windows #91

Open
stephane-r opened this issue Jan 28, 2015 · 7 comments · May be fixed by #94
Open

No notification appears on Windows #91

stephane-r opened this issue Jan 28, 2015 · 7 comments · May be fixed by #94

Comments

@stephane-r
Copy link

Hi guys,

After installing grunt-notify on my project and Growl for Windows (7), i don't have notification if i start any task.

A part of my gruntfile :

    notify: {
        watch: {
            options: {
                title: 'Task Complete',  // optional
                message: 'SASS and Uglify finished running', //required
            }
        }
    }

// 4. Nous disons à Grunt quoi faire lorsque nous tapons "grunt" dans la console.
grunt.task.run('notify_hooks');

// Les tâches par défaut
grunt.registerTask('default', 'cmq', 'concat', 'uglify', 'watch', 'notify_hooks');
grunt.registerTask('dev', ['watch', 'notify']);

Any idea ? :)

Thank you !

@stephane-r
Copy link
Author

Up :)

@asokol1981
Copy link

Try adding:

windowsVerbatimArguments: true

to options array of:

grunt-notify\lib\util\spawn.js

Config's title and message must be double-quoted, like so:

title: '"Task Complete"',
message: '"SASS and Uglify finished running"'

@johnmcase johnmcase linked a pull request Mar 5, 2015 that will close this issue
@alexberanger
Copy link

Hello!

Windows 7 users, maybe this fix can help you !

Just change:
'/i:' + image
with
windowsOnly('/i:"') + image.replace(/\\/g,"/") + windowsOnly('"') in grunt-notify/lib/platforms/growl-notify.js, line 72.

It correctly escape the system path to the notification icon file ;)

Very happy seeing again my notifications here :D !!!

@stephane-r
Copy link
Author

Hi guys :)

I still have no notifications on Windows (7 and 10). Maybe my gruntfile can help you :

notify_hooks: {
    options: {
        enabled: true,
        max_js_hint_notifications: 5,
        title: 'Cookiejar'
    }
},

grunt.registerTask('test', ['php']);
grunt.registerTask('dev', ['watch', 'notify_hooks']);
grunt.registerTask('default', 'concat', 'watch');

// Les tâches de productions
grunt.registerTask('prod', ['concat', 'uglify', 'sass', 'combine_mq', 'cssmin']);

Edit : I've notif only if i've a error on my gruntfile (example task not found).

Thank you !

@alexberanger
Copy link

Hi!

Try putting your title and message between " and ', like in the following example:
watch: { options: { title: '"Watch"', message: '"Snipers on the roof, sir!"' } },

It's a piece of my Gruntfile ;)

@stephane-r
Copy link
Author

Hi Alex,

Thank you, working nice on Windows 10 ! :) (i'll test on W7 tomorrow :D)

@rquadling
Copy link
Contributor

#113

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants