dockers/screenshotter/screenshotter.js
function execFile(cmd, args, opts) {
    return new Promise(function(resolve, reject) {
        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;
                reject(err);
            } else {
                resolve(stdout);
            }
        });
    });
}
function execFile(cmd, args, opts) {
    return new Promise(function(resolve, reject) {
        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;
                reject(err);
            } else {
                resolve(stdout);
            }
        });
    });
}
function execFile ( cmd , args , opts ) { return new Promise ( function ( resolve , reject ) { 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 ; reject ( err ) ; } else { resolve ( stdout ) ; } } ) ; } ) ; }
Execute a given command, and return a promise to its output.
Execute a given command and return a promise to its output .