snyk 1.1052.0 → 1.1053.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.
@@ -159209,13 +159209,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
159209
159209
  exports.execute = void 0;
159210
159210
  const childProcess = __webpack_require__(63129);
159211
159211
  function execute(command, args, options, shell = false) {
159212
- const spawnOptions = { shell };
159212
+ const spawnOptions = { shell, env: process.env };
159213
159213
  if (options === null || options === void 0 ? void 0 : options.cwd) {
159214
159214
  spawnOptions.cwd = options.cwd;
159215
159215
  }
159216
159216
  if (options === null || options === void 0 ? void 0 : options.env) {
159217
159217
  spawnOptions.env = Object.assign(Object.assign({}, process.env), options.env);
159218
159218
  }
159219
+ // Before spawning an external process, we look if we need to restore the system proxy configuration,
159220
+ // which overides the cli internal proxy configuration.
159221
+ if (process.env.SNYK_SYSTEM_HTTP_PROXY !== undefined) {
159222
+ spawnOptions.env.HTTP_PROXY = process.env.SNYK_SYSTEM_HTTP_PROXY;
159223
+ }
159224
+ if (process.env.SNYK_SYSTEM_HTTPS_PROXY !== undefined) {
159225
+ spawnOptions.env.HTTPS_PROXY = process.env.SNYK_SYSTEM_HTTPS_PROXY;
159226
+ }
159227
+ if (process.env.SNYK_SYSTEM_NO_PROXY !== undefined) {
159228
+ spawnOptions.env.NO_PROXY = process.env.SNYK_SYSTEM_NO_PROXY;
159229
+ }
159219
159230
  return new Promise((resolve, reject) => {
159220
159231
  let stdout = '';
159221
159232
  let stderr = '';