module.exports.command = function (notifier, options, cb) { var notifier = shellwords.escape(notifier); return cp.exec(notifier + ' ' + options.join(' '), function (error, stdout, stderr) { if (error) return cb(error); cb(stderr, stdout); }); };
module.exports.command = function (notifier, options, cb) { var notifyApp = exec(shellwords.escape(notifier) + ' ' + options.join(' '), function (error, stdout, stderr) { if (error) { return cb(error); } cb(stderr, stdout); }); return notifyApp; };
var zopfli = function(filePath, destPath, options, callback) { var args = [ '-c', '--i' + options.iterations, options.format == 'gzip' ? '--gzip' : options.format == 'deflate' ? '--deflate' : '--zlib', shellEscape(filePath) ]; var bin = options.path || 'zopfli'; if (options.splitLast) { args.unshift('--splitlast'); }; var command = bin + ' ' + args.join(' ') + ' > ' + shellEscape(destPath); exec(command, function(error, stdout, stderr) { callback.call(this, error || stderr, stdout); }); };
module.exports.command = function(notifier, options, cb) { notifier = shellwords.escape(notifier); if (process.env.DEBUG) { console.info('node-notifier debug info (command):'); console.info('[notifier path]', notifier); console.info('[notifier options]', options.join(' ')); } return cp.exec(notifier + ' ' + options.join(' '), function( error, stdout, stderr ) { if (error) return cb(error); cb(stderr, stdout); }); };