()
| 57 | |
| 58 | // clone process.env and add http proxy |
| 59 | export function createEnvOption(): {} { |
| 60 | const proxy: string | undefined = getHttpAgent(); |
| 61 | if (proxy) { |
| 62 | const env: any = Object.create(process.env); |
| 63 | env.http_proxy = proxy; |
| 64 | return env; |
| 65 | } |
| 66 | return process.env; |
| 67 | } |
| 68 | |
| 69 | function getHttpAgent(): string | undefined { |
| 70 | return vscode.workspace.getConfiguration("http").get<string>("proxy"); |
no test coverage detected