node-notifier
node-notifier copied to clipboard
prepend "XDG_RUNTIME_DIR" to command method in order to fix #226
In #226 some people complained that node-notifier doesnt work if the script is automatically invoked by CRON.
SPDUK however found a soloution which is to prepend
XDG_RUNTIME_DIR=/run/user/$(id -u)
to the command, i think we should modify the way node-notifier
calls the notify-send function so it just works out of the box.
I cant check whether this is working cross platform, on Linux it works like a charm, other platforms have to be tested, i dont have any windows/mac machine here so i unforunately cant test it :/
This looks to me to be very Unix specific. I have some concerns if this is something this module should handle or not, but in any case the PR as it sits now seems to add the envvar to every command also on mac and windows, which looks from #226 like it is unnecessary? If anywhere, maybe this should be inside notify-send implementation?