From 0190702616c24c5033a074b341eb8578088f6f4a Mon Sep 17 00:00:00 2001 From: Akioe Yu Date: Mon, 17 Feb 2025 01:21:11 +0800 Subject: [PATCH] fix: check script error (#2453) (cherry picked from commit 97bde64fd6516019a190d52f05af54ade623d57c) --- scripts/check.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/check.mjs b/scripts/check.mjs index b1d4da30..fd7a9cd0 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -5,7 +5,7 @@ import { extract } from "tar"; import path from "path"; import AdmZip from "adm-zip"; import fetch from "node-fetch"; -import proxyAgent from "https-proxy-agent"; +import { HttpsProxyAgent } from "https-proxy-agent"; import { execSync } from "child_process"; import { log_info, log_debug, log_error, log_success } from "./utils.mjs"; import { glob } from "glob"; @@ -85,7 +85,7 @@ async function getLatestAlphaVersion() { process.env.https_proxy; if (httpProxy) { - options.agent = proxyAgent(httpProxy); + options.agent = new HttpsProxyAgent(httpProxy); } try { const response = await fetch(META_ALPHA_VERSION_URL, { @@ -132,7 +132,7 @@ async function getLatestReleaseVersion() { process.env.https_proxy; if (httpProxy) { - options.agent = proxyAgent(httpProxy); + options.agent = new HttpsProxyAgent(httpProxy); } try { const response = await fetch(META_VERSION_URL, { @@ -332,7 +332,7 @@ async function resolveResource(binInfo) { process.env.https_proxy; if (httpProxy) { - options.agent = proxyAgent(httpProxy); + options.agent = new HttpsProxyAgent(httpProxy); } const response = await fetch(url, {