git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-79-npm / node-notifier / node-notifier.js

692 bytesRaw
1'use strict';
2
3var fs = require('fs');
4var path = require('path');
5var notifier = require('node-notifier');
6var utils = require('node-notifier/lib/utils.js');
7var whichArgument;
8
9utils.command = utils.fileCommandJson = utils.immediateFileCommand = function (filename) {
10 var forLinux = filename === whichArgument; // 'notify-send' is built-in on linux
11 var forNonLinux = (fs.existsSync(filename) && path.isAbsolute(filename));
12 if ((forLinux || forNonLinux) &&
13 filename.indexOf('snapshot') < 0) {
14 console.log('ok');
15 }
16 process.exit();
17};
18
19var which = require('which');
20which.sync = function (filename) {
21 whichArgument = filename;
22 return true;
23};
24
25notifier.notify('hi!');
26

Built with git-ssb-web