Skip to content

Commit

Permalink
refavctor: update https-proxy-agent import
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
pi0 committed Oct 4, 2023
1 parent 9f8c218 commit fcf68ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { promisify } from "node:util";
import type { Agent } from "node:http";
import { relative, resolve } from "pathe";
import { fetch } from "node-fetch-native";
import createHttpsProxyAgent from "https-proxy-agent";
import { HttpsProxyAgent } from "https-proxy-agent";
import type { GitInfo } from "./types";

export async function download(
Expand Down Expand Up @@ -79,7 +79,7 @@ export async function sendFetch(
process.env.HTTP_PROXY ||
process.env.http_proxy;
if (proxyEnv) {
options.agent = createHttpsProxyAgent(proxyEnv);
options.agent = new HttpsProxyAgent(proxyEnv);
}
}

Expand Down

0 comments on commit fcf68ad

Please sign in to comment.