lib/qx/tool/cli/commands/Command.js
function(cmd) {
      return new Promise((resolve, reject) => {
        child_process.exec(cmd, (err, stdout, stderr) => {
          if (err) {
            reject(err);
          }
          if (stderr) {
            reject(new Error(stderr));
          }
          resolve(stdout);
        });
      });
    }
function(cmd) {
      return new Promise((resolve, reject) => {
        child_process.exec(cmd, (err, stdout, stderr) => {
          if (err) {
            reject(err);
          }
          if (stderr) {
            reject(new Error(stderr));
          }
          resolve(stdout);
        });
      });
    }
Awaitable wrapper around child_process.exec
Executes a command and return its result wrapped in a Promise.
@param cmd {String} Command with all parameters
@return {Promise} Promise that resolves with the result