sandboxedjs 0.1.39 → 0.1.41

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.
@@ -28779,13 +28779,19 @@ function createChildProcessModule(spawnChild, defaultCwd, syncSpawn, defaultEnv
28779
28779
  const shell = typeof options.shell === "string" ? options.shell : "/bin/sh";
28780
28780
  return { file: shell, args: ["-c", command] };
28781
28781
  };
28782
+ const stdinIgnored = (options) => {
28783
+ const stdio = options.stdio;
28784
+ if (stdio === "ignore") return true;
28785
+ return Array.isArray(stdio) && stdio[0] === "ignore";
28786
+ };
28782
28787
  const start = (file, args, options) => {
28783
28788
  const resolved = options.shell ? throughShell([file, ...args].join(" "), options) : { file, args };
28784
28789
  const handle = spawnChild({
28785
28790
  command: resolved.file,
28786
28791
  args: resolved.args,
28787
28792
  cwd: options.cwd ?? defaultCwd(),
28788
- env: environmentFor(options)
28793
+ env: environmentFor(options),
28794
+ ...stdinIgnored(options) ? { stdinIgnored: true } : {}
28789
28795
  });
28790
28796
  return new ChildProcess(handle, resolved.file, resolved.args);
28791
28797
  };