mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-04 23:33:44 +08:00
fix: check script error (#2453)
(cherry picked from commit 97bde64fd6516019a190d52f05af54ade623d57c)
This commit is contained in:
parent
cee9be81bf
commit
3363c37457
@ -5,7 +5,7 @@ import { extract } from "tar";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import AdmZip from "adm-zip";
|
import AdmZip from "adm-zip";
|
||||||
import fetch from "node-fetch";
|
import fetch from "node-fetch";
|
||||||
import proxyAgent from "https-proxy-agent";
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
||||||
import { execSync } from "child_process";
|
import { execSync } from "child_process";
|
||||||
import { log_info, log_debug, log_error, log_success } from "./utils.mjs";
|
import { log_info, log_debug, log_error, log_success } from "./utils.mjs";
|
||||||
import { glob } from "glob";
|
import { glob } from "glob";
|
||||||
@ -85,7 +85,7 @@ async function getLatestAlphaVersion() {
|
|||||||
process.env.https_proxy;
|
process.env.https_proxy;
|
||||||
|
|
||||||
if (httpProxy) {
|
if (httpProxy) {
|
||||||
options.agent = proxyAgent(httpProxy);
|
options.agent = new HttpsProxyAgent(httpProxy);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await fetch(META_ALPHA_VERSION_URL, {
|
const response = await fetch(META_ALPHA_VERSION_URL, {
|
||||||
@ -132,7 +132,7 @@ async function getLatestReleaseVersion() {
|
|||||||
process.env.https_proxy;
|
process.env.https_proxy;
|
||||||
|
|
||||||
if (httpProxy) {
|
if (httpProxy) {
|
||||||
options.agent = proxyAgent(httpProxy);
|
options.agent = new HttpsProxyAgent(httpProxy);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await fetch(META_VERSION_URL, {
|
const response = await fetch(META_VERSION_URL, {
|
||||||
@ -332,7 +332,7 @@ async function resolveResource(binInfo) {
|
|||||||
process.env.https_proxy;
|
process.env.https_proxy;
|
||||||
|
|
||||||
if (httpProxy) {
|
if (httpProxy) {
|
||||||
options.agent = proxyAgent(httpProxy);
|
options.agent = new HttpsProxyAgent(httpProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user