MCPcopy Create free account
hub / github.com/Marus/cortex-debug / runProg

Function runProg

release.js:85–109  ·  view source on GitHub ↗
(args, cb)

Source from the content-addressed store, hash-verified

83}
84
85function runProg(args, cb) {
86 if (isDryRun) {
87 args.unshift('echo');
88 }
89 // console.log('Executing ' + args.join(' '));
90 const cmd = args.join(' ');
91 const arg0 = args.shift();
92 const prog = child_process.spawn(arg0, args, {
93 stdio:'inherit'
94 });
95 prog.on('error', (error) => {
96 console.error(`Error running '${cmd}': ${error.message}`);
97 if (cb) {
98 cb(-1);
99 }
100 });
101 prog.on("close", (code) => {
102 if (!isDryRun) {
103 console.log(`'${cmd}' ... exited with code ${code}`);
104 }
105 if (cb) {
106 cb(code);
107 }
108 });
109}
110
111function run() {
112 let isPkg = true;

Callers 1

vsceRunFunction · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected