dockers/texcmp/texcmp.js
function execFile(cmd, args, opts) {
    const deferred = Q.defer();
    childProcess.execFile(cmd, args, opts, function(err, stdout, stderr) {
        if (err) {
            console.error("Error executing " + cmd + " " + args.join(" "));
            console.error(stdout + stderr);
            err.stdout = stdout;
            err.stderr = stderr;
            deferred.reject(err);
        } else {
            deferred.resolve(stdout);
        }
    });
    return deferred.promise;
}
function execFile(cmd, args, opts) {
    const deferred = Q.defer();
    childProcess.execFile(cmd, args, opts, function(err, stdout, stderr) {
        if (err) {
            console.error("Error executing " + cmd + " " + args.join(" "));
            console.error(stdout + stderr);
            err.stdout = stdout;
            err.stderr = stderr;
            deferred.reject(err);
        } else {
            deferred.resolve(stdout);
        }
    });
    return deferred.promise;
}
function execFile ( cmd , args , opts ) { const deferred = Q . defer ( ) ; childProcess . execFile ( cmd , args , opts , function ( err , stdout , stderr ) { if ( err ) { console . error ( "Error executing " + cmd + " " + args . join ( " " ) ) ; console . error ( stdout + stderr ) ; err . stdout = stdout ; err . stderr = stderr ; deferred . reject ( err ) ; } else { deferred . resolve ( stdout ) ; } } ) ; return deferred . promise ; }
Execute a given command, and return a promise to its output. Don't denodeify here, since fail branch needs access to stderr.
Execute a given command and return a promise to its output . Don t denodeify here since fail branch needs access to stderr .