From e6a1e213b5ca22ef03934496a7a34975265d44dc Mon Sep 17 00:00:00 2001 From: Gold John King Date: Mon, 23 Dec 2024 18:16:44 +0800 Subject: [PATCH] remove useless async and await --- src/main/helpers/proxy.helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/helpers/proxy.helpers.ts b/src/main/helpers/proxy.helpers.ts index e870fee4..d5898aa9 100644 --- a/src/main/helpers/proxy.helpers.ts +++ b/src/main/helpers/proxy.helpers.ts @@ -32,13 +32,13 @@ async function getProxyOverride(): Promise{ return registryValue.value; } -async function configureWindowsProxy() : Promise { - 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}`);