Skip to content

Commit

Permalink
Merge pull request #2540 from thankwsx/master
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed May 25, 2020
2 parents 0232497 + bd0bafa commit cf742b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/packages/fetch-engine/src/downloadZip.ts
Expand Up @@ -25,9 +25,13 @@ async function fetchSha256(
// "3c82ee6cd9fedaec18a5e7cd3fc41f8c6b3dd32575dc13443d96aab4bd018411 query-engine.gz\n"
// So we split it by whitespace and just get the hash, as that's what we're interested in
const [zippedSha256, sha256] = [
(await fetch(`${url}.sha256`).then((res) => res.text())).split(/\s+/)[0],
(await fetch(`${url}.sha256`, {
agent: getProxyAgent(url)
}).then((res) => res.text())).split(/\s+/)[0],
(
await fetch(`${url.slice(0, url.length - 3)}.sha256`).then((res) =>
await fetch(`${url.slice(0, url.length - 3)}.sha256`, {
agent: getProxyAgent(url.slice(0, url.length - 3))
}).then((res) =>
res.text(),
)
).split(/\s+/)[0],
Expand Down

0 comments on commit cf742b4

Please sign in to comment.