code: function execute(cmd) {
    return new Promise((resolve, reject) => {
      exec(cmd, function(err, stdout) {
        if (err) {
          reject(err);
        } else {
          resolve(stdout);
        }
      });
    });
  }
docs: Executes a command and returns its output if it succeeds.
  @param {string} cmd The command to execute.
  @return {!Promise<string>} A promise that will resolve with the command's
  stdout data.