@@ -3988,6 +3988,29 @@ Instantiating classes without the `new` qualifier exported by the `node:http` mo
39883988It is recommended to use the ` new ` qualifier instead. This applies to all http classes, such as
39893989` OutgoingMessage ` , ` IncomingMessage ` , ` ServerResponse ` and ` ClientRequest ` .
39903990
3991+ ### DEP0196: Calling ` node:child_process ` functions with ` options.shell ` as an empty string
3992+
3993+ <!-- YAML
3994+ changes:
3995+ - version: REPLACEME
3996+ pr-url: https://github.com/nodejs/node/pull/58564
3997+ description: Documentation-only deprecation.
3998+ -->
3999+
4000+ Type: Documentation-only
4001+
4002+ Calling the process-spawning functions with ` { shell: '' } ` is almost certainly
4003+ unintentional, and can cause aberrant behavior.
4004+
4005+ To make [ ` child_process.execFile ` ] [ ] or [ ` child_process.spawn ` ] [ ] invoke the
4006+ default shell, use ` { shell: true } ` . If the intention is not to invoke a shell
4007+ (default behavior), either omit the ` shell ` option, or set it to ` false ` or a
4008+ nullish value.
4009+
4010+ To make [ ` child_process.exec ` ] [ ] invoke the default shell, either omit the
4011+ ` shell ` option, or set it to a nullish value. If the intention is not to invoke
4012+ a shell, use [ ` child_process.execFile ` ] [ ] instead.
4013+
39914014[ DEP0142 ] : #dep0142-repl_builtinlibs
39924015[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
39934016[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -4016,6 +4039,7 @@ It is recommended to use the `new` qualifier instead. This applies to all http c
40164039[ `asyncResource.runInAsyncScope()` ] : async_context.md#asyncresourceruninasyncscopefn-thisarg-args
40174040[ `buffer.subarray` ] : buffer.md#bufsubarraystart-end
40184041[ `child_process.execFile` ] : child_process.md#child_processexecfilefile-args-options-callback
4042+ [ `child_process.exec` ] : child_process.md#child_processexeccommand-options-callback
40194043[ `child_process.spawn` ] : child_process.md#child_processspawncommand-args-options
40204044[ `child_process` ] : child_process.md
40214045[ `clearInterval()` ] : timers.md#clearintervaltimeout
0 commit comments