Download patches/gcp-metadata@8.1.2.patch from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 625 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/patches/gcp-metadata%408.1.2.patch
- Command line
-
hf download hf://SaylorTwift/opencode/patches/gcp-metadata@8.1.2.patch
-
curl -L -o gcp-metadata@8.1.2.patch https://huggingface.co/SaylorTwift/opencode/resolve/main/patches/gcp-metadata%408.1.2.patch
625 Bytes
| diff --git a/build/src/index.js b/build/src/index.js | |
| --- a/build/src/index.js | |
| +++ b/build/src/index.js | |
| async function isAvailable() { | |
| if (process.env.DEBUG_AUTH) { | |
| console.info(err); | |
| } | |
| + // Promise.any() rejects with AggregateError when neither metadata host | |
| + // is available. This is expected outside GCP, not a warning condition. | |
| + if (err instanceof AggregateError) | |
| + return false; | |
| if (err.type === 'request-timeout') { | |
| // If running in a GCP environment, metadata endpoint should return | |
| // within ms. | |