From 359514a83cbcb7b16081c1a64e8fe5cfef18038a Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 29 May 2022 10:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=98=E9=87=8F=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/core/useApp/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/core/useApp/index.js b/src/renderer/core/useApp/index.js index a486748d..1bbf13b7 100644 --- a/src/renderer/core/useApp/index.js +++ b/src/renderer/core/useApp/index.js @@ -54,8 +54,9 @@ export default () => { getEnvParams().then(envParams => { // 移除代理相关的环境变量设置,防止请求库自动应用它们 // eslint-disable-next-line no-undef - for (const key of Object.keys(ENVIRONMENT)) { - if (/^(?:http_proxy|https_proxy|NO_PROXY)$/i.test(key)) delete process.env[key] + const processEnv = ENVIRONMENT + for (const key of Object.keys(processEnv)) { + if (/^(?:http_proxy|https_proxy|NO_PROXY)$/i.test(key)) delete processEnv[key] } const envProxy = envParams.cmdParams['proxy-server'] if (envProxy && typeof envProxy == 'string') {