"Fossies" - the Fresh Open Source Software Archive

Member "cli-1.1280.1/src/lib/iac/env-utils.ts" (20 Feb 2024, 554 Bytes) of package /linux/misc/snyk-cli-1.1280.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 export function restoreEnvProxy(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
    2   // WARN: We are restoring system en proxy because snyk cli override them but the proxy uses untrusted certs
    3   if (process.env.SNYK_SYSTEM_HTTP_PROXY != undefined) {
    4     env.HTTP_PROXY = process.env.SNYK_SYSTEM_HTTP_PROXY;
    5   }
    6   if (process.env.SNYK_SYSTEM_HTTPS_PROXY != undefined) {
    7     env.HTTPS_PROXY = process.env.SNYK_SYSTEM_HTTPS_PROXY;
    8   }
    9   if (process.env.SNYK_SYSTEM_NO_PROXY != undefined) {
   10     env.NO_PROXY = process.env.SNYK_SYSTEM_NO_PROXY;
   11   }
   12   return env;
   13 }