We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fd34ed + 70968f4 commit 312444aCopy full SHA for 312444a
scripts/downloadBackend.ts
@@ -56,12 +56,14 @@ async function downloadRedisBackendArchive(
56
destDir: string,
57
): Promise<string> {
58
ensureFolderExists(destDir)
59
- const downloadUrl = getDownloadUrl()
+ let downloadUrl = getDownloadUrl()
60
61
return new Promise((resolve, reject) => {
62
const requestOptions: https.RequestOptions = parseUrl(downloadUrl)
63
https.get(requestOptions, (res) => {
64
- if (res.statusCode !== 200) {
+ if (res.statusCode === 302 && res.headers.location) {
65
+ downloadUrl = res.headers.location
66
+ } else if (res.statusCode !== 200) {
67
reject(new Error('Failed to get Redis Insight backend archive location'))
68
}
69
0 commit comments