修复变量移除问题
parent
90ea0dc857
commit
359514a83c
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue