async function getGcloudCredentials()

in src/auth.js [65:71]


async function getGcloudCredentials() {
  const isWindows = process.platform === 'win32';
  let gcloud = isWindows? "gcloud.cmd" : "gcloud";
  const {stdout, stderr} = await exec(`${gcloud} auth print-access-token`);
  // the token from gcloud auth print-access-token has a newline in the end
  return stdout.trim();
}