gcp-metadata@8.1.2.patch 625 B

1234567891011121314
  1. diff --git a/build/src/index.js b/build/src/index.js
  2. --- a/build/src/index.js
  3. +++ b/build/src/index.js
  4. @@ -323,6 +323,10 @@ async function isAvailable() {
  5. if (process.env.DEBUG_AUTH) {
  6. console.info(err);
  7. }
  8. + // Promise.any() rejects with AggregateError when neither metadata host
  9. + // is available. This is expected outside GCP, not a warning condition.
  10. + if (err instanceof AggregateError)
  11. + return false;
  12. if (err.type === 'request-timeout') {
  13. // If running in a GCP environment, metadata endpoint should return
  14. // within ms.