Skip to content

Commit

Permalink
remove useless async and await
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldJohnKing committed Dec 23, 2024
1 parent 57b7ee0 commit e6a1e21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/helpers/proxy.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ async function getProxyOverride(): Promise<string>{
return registryValue.value;
}

async function configureWindowsProxy() : Promise<void> {
if (await isProxyEnabled().catch(err => log.error(err))) {
const httpProxyUrl = `http://${await getProxyServer().catch(err => log.error(err))}`
function configureWindowsProxy() {
if (isProxyEnabled().catch(err => log.error(err))) {
const httpProxyUrl = `http://${getProxyServer().catch(err => log.error(err))}`
process.env.GLOBAL_AGENT_HTTP_PROXY = httpProxyUrl;
process.env.GLOBAL_AGENT_HTTPS_PROXY = httpProxyUrl;

process.env.GLOBAL_AGENT_NO_PROXY = `${await getProxyOverride().catch(err => log.error(err))}`;
process.env.GLOBAL_AGENT_NO_PROXY = `${getProxyOverride().catch(err => log.error(err))}`;

log.info(`configureWindowsProxy: Using system proxy: ${process.env.GLOBAL_AGENT_HTTP_PROXY}`);

Expand Down

0 comments on commit e6a1e21

Please sign in to comment.