@@ -3824,6 +3824,29 @@ Instantiating classes without the `new` qualifier exported by the `node:http` mo
38243824It is recommended to use the ` new ` qualifier instead. This applies to all http classes, such as
38253825` OutgoingMessage ` , ` IncomingMessage ` , ` ServerResponse ` and ` ClientRequest ` .
38263826
3827+ ### DEP0196: Calling ` node:child_process ` functions with ` options.shell ` as an empty string
3828+
3829+ <!-- YAML
3830+ changes:
3831+ - version: REPLACEME
3832+ pr-url: https://github.com/nodejs/node/pull/58564
3833+ description: Documentation-only deprecation.
3834+ -->
3835+
3836+ Type: Documentation-only
3837+
3838+ Calling the process-spawning functions with ` { shell: '' } ` is almost certainly
3839+ unintentional, and can cause aberrant behavior.
3840+
3841+ To make [ ` child_process.execFile ` ] [ ] or [ ` child_process.spawn ` ] [ ] invoke the
3842+ default shell, use ` { shell: true } ` . If the intention is not to invoke a shell
3843+ (default behavior), either omit the ` shell ` option, or set it to ` false ` or a
3844+ nullish value.
3845+
3846+ To make [ ` child_process.exec ` ] [ ] invoke the default shell, either omit the
3847+ ` shell ` option, or set it to a nullish value. If the intention is not to invoke
3848+ a shell, use [ ` child_process.execFile ` ] [ ] instead.
3849+
38273850[ DEP0142 ] : #dep0142-repl_builtinlibs
38283851[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
38293852[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -3855,6 +3878,7 @@ It is recommended to use the `new` qualifier instead. This applies to all http c
38553878[ `asyncResource.runInAsyncScope()` ] : async_context.md#asyncresourceruninasyncscopefn-thisarg-args
38563879[ `buffer.subarray` ] : buffer.md#bufsubarraystart-end
38573880[ `child_process.execFile` ] : child_process.md#child_processexecfilefile-args-options-callback
3881+ [ `child_process.exec` ] : child_process.md#child_processexeccommand-options-callback
38583882[ `child_process.spawn` ] : child_process.md#child_processspawncommand-args-options
38593883[ `child_process` ] : child_process.md
38603884[ `clearInterval()` ] : timers.md#clearintervaltimeout
0 commit comments