修复变量移除问题
parent
90ea0dc857
commit
359514a83c
|
@ -54,8 +54,9 @@ export default () => {
|
||||||
getEnvParams().then(envParams => {
|
getEnvParams().then(envParams => {
|
||||||
// 移除代理相关的环境变量设置,防止请求库自动应用它们
|
// 移除代理相关的环境变量设置,防止请求库自动应用它们
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
for (const key of Object.keys(ENVIRONMENT)) {
|
const processEnv = ENVIRONMENT
|
||||||
if (/^(?:http_proxy|https_proxy|NO_PROXY)$/i.test(key)) delete process.env[key]
|
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']
|
const envProxy = envParams.cmdParams['proxy-server']
|
||||||
if (envProxy && typeof envProxy == 'string') {
|
if (envProxy && typeof envProxy == 'string') {
|
||||||
|
|
Loading…
Reference in New Issue