mikaelbr/gulp-notify

Not running Notification Center (OSX)

Closed this issue · 6 comments

I have disabled the Notification Center on OSX.
How do I configure Notify to only output errors to the Terminal?

Error message:

Error in plugin 'gulp-notify': Command failed: 2014-05-28 11:22:00.178 terminal-notifier[68362:d07] [!] Unable to post a notification for the current user (ryan), as it has no running NotificationCenter instance.

How have you disabled the Notification Center? By having "do not disturb", keepalive=false and killall?

What version of gulp-notify do you have? As of v1.3.0 all errors should fail silently.

@mikaelbr

I have disabled it using "keepalive=false and killall".
I am running gulp-notify v1.3.0.

Have I configured it wrong in the gulpfile?
https://github.com/eikeco/generator-storm-frontend/blob/master/app/templates/gulpfile.js

Have I configured it wrong in the gulpfile?

Not as far as I can see. I think I'll need to try to disable the notification center myself to reproduce this.

Thanks for looking into this @mikaelbr

I've tried this out. Now you get to print the message to the terminal, but you also get the error returned from gulp-notify.

Example:

[20:06:01] gulp-notify: [Gulp notification] Compiled file
[20:06:02] gulp-notify: [Error in notifier] [gulp] Error in plugin 'gulp-notify': Command failed: 2014-06-18 20:06:02.125 terminal-notifier[7610:d07] [!] Unable to post a notification for the current user (mikaelbrevik), as it has no running NotificationCenter instance.

I don't think the best way here is to be able to deactivate this. If you just want to output to the terminal you can use something like gulp-util.log (gulp-util will be deprecated, but something similar like console.log or what ever). Don't you agree? Or in what use case would you want to use gulp-notify instead of some simpler logging if you simply want to output to the terminal?

@mikaelbr I agree. gulp-util.log is what I am looking for. Thanks for investigating :)