MCPcopy
hub / github.com/KaTeX/KaTeX / execFile

Function execFile

dockers/texcmp/texcmp.js:205–219  ·  view source on GitHub ↗
(cmd, args, opts)

Source from the content-addressed store, hash-verified

203// Execute a given command, and return a promise to its output.
204// Don't denodeify here, since fail branch needs access to stderr.
205function execFile(cmd, args, opts) {
206 const deferred = Q.defer();
207 childProcess.execFile(cmd, args, opts, function(err, stdout, stderr) {
208 if (err) {
209 console.error("Error executing " + cmd + " " + args.join(" "));
210 console.error(stdout + stderr);
211 err.stdout = stdout;
212 err.stderr = stderr;
213 deferred.reject(err);
214 } else {
215 deferred.resolve(stdout);
216 }
217 });
218 return deferred.promise;
219}
220
221// Read given file and parse it as a PNG file.
222function readPNG(file) {

Callers 2

processTestCaseFunction · 0.85
takeScreenshotFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…