MCPcopy
hub / github.com/Unitech/pm2 / readRc

Function readRc

lib/completion.js:190–197  ·  view source on GitHub ↗
(completer, cb)

Source from the content-addressed store, hash-verified

188}
189
190function readRc(completer, cb) {
191 var file = '.' + process.env.SHELL.match(/\/bin\/(\w+)/)[1] + 'rc',
192 filepath = pth.join(process.env.HOME, file);
193 fs.lstat(filepath, function (err, stats) {
194 if(err) return cb(new Error("No " + file + " file. You'll have to run instead: " + completer + " completion >> ~/" + file));
195 fs.readFile(filepath, 'utf8', cb);
196 });
197}
198
199function writeRc(content, cb) {
200 var file = '.' + process.env.SHELL.match(/\/bin\/(\w+)/)[1] + 'rc',

Callers 3

installFunction · 0.85
uninstallFunction · 0.85
installedFunction · 0.85

Calls 1

cbFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…