node-notifier
Advanced tools
Comparing version 1.1.1-2 to 1.1.2-0
@@ -35,8 +35,11 @@ /** | ||
if (!options.message) { | ||
throw new Error('Message is required.'); | ||
callback(new Error('Message is required.')); | ||
return this; | ||
} | ||
if (os.type() !== 'Linux') { | ||
throw new Error('Only supported on Linux systems'); | ||
callback(new Error('Only supported on Linux systems')); | ||
return this; | ||
} | ||
options.title = options.title || 'Node Notification:'; | ||
@@ -43,0 +46,0 @@ var initial = [options.title, options.message]; |
@@ -46,3 +46,3 @@ /** | ||
if (error) { | ||
throw new Error(errorMsg); | ||
return callback(new Error(errorMsg)); | ||
} | ||
@@ -49,0 +49,0 @@ utils.command(notifier, argsList, callback); |
@@ -11,3 +11,3 @@ var child_process = require('child_process') | ||
var notifyApp = exec(escapeShell(notifier) + ' ' + options.join(' '), function (error, stdout, stderr) { | ||
if (error !== null) { | ||
if (error) { | ||
return cb(error); | ||
@@ -14,0 +14,0 @@ } |
{ | ||
"name": "node-notifier", | ||
"version": "1.1.1-2", | ||
"version": "1.1.2-0", | ||
"description": "A Node.js wrapper for the terminal-notifier application", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,6 @@ # node-notifier | ||
If using Linux, `notify-send` must be installed on your system. | ||
However, [terminal-notifier](https://github.com/alloy/terminal-notifier), comes | ||
bundled in the module. So on Mac, not additional installations is necessary. | ||
## Install | ||
@@ -10,0 +14,0 @@ ``` |
@@ -1,2 +0,2 @@ | ||
var notifier = require('../index') | ||
var notifier = require('../lib/terminal-notifier') | ||
, should = require('should') | ||
@@ -16,3 +16,3 @@ , assert = require('assert'); | ||
it('should notify with a message', function(done){ | ||
notifier.notify({ | ||
@@ -28,3 +28,3 @@ message: "Hello World" | ||
it('should be chainable', function(done){ | ||
notifier.notify({ | ||
@@ -31,0 +31,0 @@ message: "First test" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
447717
282
88