修复变量移除问题

pull/930/merge
lyswhut 2022-05-29 10:58:04 +08:00
parent 90ea0dc857
commit 359514a83c
1 changed files with 3 additions and 2 deletions

View File

@ -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') {