Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXadillaX <i@2333.moe>2021-05-31 12:00:46 +0300
committerXadillaX <i@2333.moe>2021-06-04 09:33:59 +0300
commitfc4b9c1d0752e750e21a4ee7703a17fa67bfd95b (patch)
tree292b110298457bf9407876bb087c521f97d36598 /doc/api/child_process.md
parente7f941c1614ae0cc4c0022aefea130133afac612 (diff)
child_process: allow `options.cwd` receive a URL
PR-URL: https://github.com/nodejs/node/pull/38862 Fixes: https://github.com/nodejs/node/issues/38861 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'doc/api/child_process.md')
-rw-r--r--doc/api/child_process.md42
1 files changed, 35 insertions, 7 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 2ac6f1c35c4..a9b6ad89a91 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -146,6 +146,10 @@ exec('"my script.cmd" a b', (err, stdout, stderr) => {
<!-- YAML
added: v0.1.90
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v15.4.0
pr-url: https://github.com/nodejs/node/pull/36308
description: AbortSignal support was added.
@@ -156,7 +160,7 @@ changes:
* `command` {string} The command to run, with space-separated arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
**Default:** `process.cwd()`.
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
* `encoding` {string} **Default:** `'utf8'`
@@ -271,6 +275,10 @@ controller.abort();
<!-- YAML
added: v0.1.91
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version:
- v15.4.0
- v14.17.0
@@ -284,7 +292,7 @@ changes:
* `file` {string} The name or path of the executable file to run.
* `args` {string[]} List of string arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
* `encoding` {string} **Default:** `'utf8'`
* `timeout` {number} **Default:** `0`
@@ -376,6 +384,10 @@ controller.abort();
<!-- YAML
added: v0.5.0
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v15.13.0
pr-url: https://github.com/nodejs/node/pull/37256
description: timeout was added.
@@ -403,7 +415,7 @@ changes:
* `modulePath` {string} The module to run in the child.
* `args` {string[]} List of string arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `detached` {boolean} Prepare child to run independently of its parent
process. Specific behavior depends on the platform, see
[`options.detached`][]).
@@ -487,6 +499,10 @@ if (process.argv[2] === 'child') {
<!-- YAML
added: v0.1.90
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v15.13.0
pr-url: https://github.com/nodejs/node/pull/37256
description: timeout was added.
@@ -517,7 +533,7 @@ changes:
* `command` {string} The command to run.
* `args` {string[]} List of string arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `env` {Object} Environment key-value pairs. **Default:** `process.env`.
* `argv0` {string} Explicitly set the value of `argv[0]` sent to the child
process. This will be set to `command` if not specified.
@@ -845,6 +861,10 @@ configuration at startup.
<!-- YAML
added: v0.11.12
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v10.10.0
pr-url: https://github.com/nodejs/node/pull/22409
description: The `input` option can now be any `TypedArray` or a
@@ -865,7 +885,7 @@ changes:
* `file` {string} The name or path of the executable file to run.
* `args` {string[]} List of string arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `input` {string|Buffer|TypedArray|DataView} The value which will be passed
as stdin to the spawned process. Supplying this value will override
`stdio[0]`.
@@ -914,6 +934,10 @@ arbitrary command execution.**
<!-- YAML
added: v0.11.12
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v10.10.0
pr-url: https://github.com/nodejs/node/pull/22409
description: The `input` option can now be any `TypedArray` or a
@@ -928,7 +952,7 @@ changes:
* `command` {string} The command to run.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `input` {string|Buffer|TypedArray|DataView} The value which will be passed
as stdin to the spawned process. Supplying this value will override
`stdio[0]`.
@@ -974,6 +998,10 @@ metacharacters may be used to trigger arbitrary command execution.**
<!-- YAML
added: v0.11.12
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/38862
+ description: The `cwd` option can be a WHATWG `URL` object using
+ `file:` protocol.
- version: v10.10.0
pr-url: https://github.com/nodejs/node/pull/22409
description: The `input` option can now be any `TypedArray` or a
@@ -997,7 +1025,7 @@ changes:
* `command` {string} The command to run.
* `args` {string[]} List of string arguments.
* `options` {Object}
- * `cwd` {string} Current working directory of the child process.
+ * `cwd` {string|URL} Current working directory of the child process.
* `input` {string|Buffer|TypedArray|DataView} The value which will be passed
as stdin to the spawned process. Supplying this value will override
`stdio[0]`.