MCPcopy
hub / github.com/remy/nodemon / command

Function command

lib/version.js:77–87  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

75}
76
77function command(cmd) {
78 return new Promise(function (resolve, reject) {
79 exec(cmd, { cwd: root }, function (err, stdout, stderr) {
80 var error = stderr.trim();
81 if (error) {
82 return reject(new Error(error));
83 }
84 resolve(stdout.split('\n').join(''));
85 });
86 });
87}
88
89function commit() {
90 return command('git rev-parse HEAD');

Callers 6

commitFunction · 0.70
branchFunction · 0.70
dirtyFunction · 0.70
parse.test.jsFile · 0.50
toCmdFunction · 0.50
load.test.jsFile · 0.50

Calls 1

execFunction · 0.85

Tested by 1

toCmdFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…