mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
fix: Revert "feat(proxy): proxy environment variables available in lowercase for child processes. (#9978)"
This reverts commit 2d9734c3da
.
This commit is contained in:
parent
af39170fc8
commit
1edcf5fc15
3 changed files with 0 additions and 33 deletions
|
@ -7,9 +7,7 @@ describe('proxy', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
delete process.env.HTTP_PROXY;
|
||||
delete process.env.http_proxy;
|
||||
delete process.env.HTTPS_PROXY;
|
||||
delete process.env.https_proxy;
|
||||
delete process.env.NO_PROXY;
|
||||
delete process.env.no_proxy;
|
||||
});
|
||||
|
@ -19,35 +17,11 @@ describe('proxy', () => {
|
|||
bootstrap();
|
||||
expect(hasProxy()).toBeTrue();
|
||||
});
|
||||
it('copies upper case HTTP_PROXY to http_proxy', () => {
|
||||
process.env.HTTP_PROXY = httpProxy;
|
||||
bootstrap();
|
||||
expect(hasProxy()).toBeTrue();
|
||||
expect(process.env.HTTP_PROXY).toBeDefined();
|
||||
expect(process.env.http_proxy).toBeDefined();
|
||||
|
||||
expect(process.env.HTTPS_PROXY).toBeUndefined();
|
||||
expect(process.env.https_proxy).toBeUndefined();
|
||||
expect(process.env.NO_PROXY).toBeUndefined();
|
||||
expect(process.env.no_proxy).toBeUndefined();
|
||||
});
|
||||
it('respects HTTPS_PROXY', () => {
|
||||
process.env.HTTPS_PROXY = httpsProxy;
|
||||
bootstrap();
|
||||
expect(hasProxy()).toBeTrue();
|
||||
});
|
||||
it('copies upper case HTTPS_PROXY to https_proxy', () => {
|
||||
process.env.HTTPS_PROXY = httpsProxy;
|
||||
bootstrap();
|
||||
expect(hasProxy()).toBeTrue();
|
||||
expect(process.env.HTTPS_PROXY).toBeDefined();
|
||||
expect(process.env.https_proxy).toBeDefined();
|
||||
|
||||
expect(process.env.HTTP_PROXY).toBeUndefined();
|
||||
expect(process.env.http_proxy).toBeUndefined();
|
||||
expect(process.env.NO_PROXY).toBeUndefined();
|
||||
expect(process.env.no_proxy).toBeUndefined();
|
||||
});
|
||||
it('does nothing', () => {
|
||||
process.env.no_proxy = noProxy;
|
||||
bootstrap();
|
||||
|
|
|
@ -14,10 +14,6 @@ export function bootstrap(): void {
|
|||
) {
|
||||
process.env[envVar] = process.env[envVar.toLowerCase()];
|
||||
}
|
||||
|
||||
if (process.env[envVar]) {
|
||||
process.env[envVar.toLowerCase()] = process.env[envVar];
|
||||
}
|
||||
});
|
||||
|
||||
if (
|
||||
|
|
|
@ -4,9 +4,6 @@ const basicEnvVars = [
|
|||
'HTTP_PROXY',
|
||||
'HTTPS_PROXY',
|
||||
'NO_PROXY',
|
||||
'http_proxy',
|
||||
'https_proxy',
|
||||
'no_proxy',
|
||||
'HOME',
|
||||
'PATH',
|
||||
'LC_ALL',
|
||||
|
|
Loading…
Reference in a new issue