mikaelbr/gulp-notify

Fail gracefully on notification error.

Closed this issue · 1 comments

From @jingchan mikaelbr/node-notifier#8

Getting "ECONNREFUSED" errors on my Windows 8.1 machine when growl for windows is not installed.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ECONNREFUSED
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)

It'd be nice to preserve gulp-notify's console output functionality while making external notification programs optional. (E.g. I'm a fan of the notification systems available on OS X, but am not a fan of Growl for Windows.)

So far I've hacked around it by adding:

.on('error', function(e){
  console.log("No notification center found");
})

Fixed in 55751ac.

See mikaelbr/node-notifier#8 for context and description of patch.