snyk 1.1222.0 → 1.1223.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233550,13 +233550,27 @@ exports.executeSync = exports.execute = void 0;
233550
233550
  const child_process_1 = __webpack_require__(32081);
233551
233551
  const shescape_1 = __webpack_require__(79114);
233552
233552
  function makeSpawnOptions(options) {
233553
- const spawnOptions = { shell: true };
233553
+ const spawnOptions = {
233554
+ shell: true,
233555
+ env: Object.assign({}, process.env),
233556
+ };
233554
233557
  if (options && options.cwd) {
233555
233558
  spawnOptions.cwd = options.cwd;
233556
233559
  }
233557
233560
  if (options && options.env) {
233558
233561
  spawnOptions.env = options.env;
233559
233562
  }
233563
+ // Before spawning an external process, we look if we need to restore the system proxy configuration,
233564
+ // which overides the cli internal proxy configuration.
233565
+ if (process.env.SNYK_SYSTEM_HTTP_PROXY !== undefined) {
233566
+ spawnOptions.env.HTTP_PROXY = process.env.SNYK_SYSTEM_HTTP_PROXY;
233567
+ }
233568
+ if (process.env.SNYK_SYSTEM_HTTPS_PROXY !== undefined) {
233569
+ spawnOptions.env.HTTPS_PROXY = process.env.SNYK_SYSTEM_HTTPS_PROXY;
233570
+ }
233571
+ if (process.env.SNYK_SYSTEM_NO_PROXY !== undefined) {
233572
+ spawnOptions.env.NO_PROXY = process.env.SNYK_SYSTEM_NO_PROXY;
233573
+ }
233560
233574
  return spawnOptions;
233561
233575
  }
233562
233576
  function execute(command, args, options) {