| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent efb28f7 commit d261274
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3955,6 +3955,29 @@ Instantiating classes without the `new` qualifier exported by the `node:http` mo | |||
| 3955 | 3955 | It is recommended to use the `new` qualifier instead. This applies to all http classes, such as | |
| 3956 | 3956 | `OutgoingMessage`, `IncomingMessage`, `ServerResponse` and `ClientRequest`. | |
| 3957 | 3957 | ||
| 3958 | + ### DEP0196: Calling `node:child_process` functions with `options.shell` as an empty string | ||
| 3959 | + | ||
| 3960 | + <!-- YAML | ||
| 3961 | + changes: | ||
| 3962 | + - version: REPLACEME | ||
| 3963 | + pr-url: https://github.com/nodejs/node/pull/58564 | ||
| 3964 | + description: Documentation-only deprecation. | ||
| 3965 | + --> | ||
| 3966 | + | ||
| 3967 | + Type: Documentation-only | ||
| 3968 | + | ||
| 3969 | + Calling the process-spawning functions with `{ shell: '' }` is almost certainly | ||
| 3970 | + unintentional, and can cause aberrant behavior. | ||
| 3971 | + | ||
| 3972 | + To make [`child_process.execFile`][] or [`child_process.spawn`][] invoke the | ||
| 3973 | + default shell, use `{ shell: true }`. If the intention is not to invoke a shell | ||
| 3974 | + (default behavior), either omit the `shell` option, or set it to `false` or a | ||
| 3975 | + nullish value. | ||
| 3976 | + | ||
| 3977 | + To make [`child_process.exec`][] invoke the default shell, either omit the | ||
| 3978 | + `shell` option, or set it to a nullish value. If the intention is not to invoke | ||
| 3979 | + a shell, use [`child_process.execFile`][] instead. | ||
| 3980 | + | ||
| 3958 | 3981 | [DEP0142]: #dep0142-repl_builtinlibs | |
| 3959 | 3982 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | |
| 3960 | 3983 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 | |
@@ -3985,6 +4008,7 @@ It is recommended to use the `new` qualifier instead. This applies to all http c | |||
| 3985 | 4008 | [`asyncResource.runInAsyncScope()`]: async_context.md#asyncresourceruninasyncscopefn-thisarg-args | |
| 3986 | 4009 | [`buffer.subarray`]: buffer.md#bufsubarraystart-end | |
| 3987 | 4010 | [`child_process.execFile`]: child_process.md#child_processexecfilefile-args-options-callback | |
| 4011 | + [`child_process.exec`]: child_process.md#child_processexeccommand-options-callback | ||
| 3988 | 4012 | [`child_process.spawn`]: child_process.md#child_processspawncommand-args-options | |
| 3989 | 4013 | [`child_process`]: child_process.md | |
| 3990 | 4014 | [`clearInterval()`]: timers.md#clearintervaltimeout | |
| Back | FazBrowse Home | New Git URL |
0 commit comments