Skip to content
Myr

Improve documentation of the `extendEnv` and `env` options (#710)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent 16e5fd6 · Browse files · 2 files+10 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−4 removed

  • other:+10 added−4 removed

2 files+10 added−4 removed

modified:index.d.ts+5 added-2 removed
388 unmodified lines
389 */390 readonly stripFinalNewline?: boolean;391392 /**393 Set to `false` if you don't want to extend the environment variables when providing the `env` property.393 If `true`, the child process uses both the `env` option and the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).394 If `false`, only the `env` option is used, not `process.env`.395396 @default true397 */398 readonly extendEnv?: boolean;
5 unmodified lines
404 */405 readonly cwd?: string | URL;406407 /**407 Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.408 Environment key-value pairs.409410 Unless the `extendEnv` option is `false`, the child process also uses the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).411412 @default process.env413 */414 readonly env?: NodeJS.ProcessEnv;415
877 unmodified lines
modified:readme.md+5 added-2 removed
683 unmodified lines
684685Type: `boolean`\686Default: `true`687688Set to `false` if you don't want to extend the environment variables when providing the `env` property.688If `true`, the child process uses both the [`env` option](#env) and the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).689If `false`, only the `env` option is used, not `process.env`.690691---692693Execa also accepts the below options which are the same as the options for [`child_process#spawn()`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)/[`child_process#exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)
9 unmodified lines
703704Type: `object`\705Default: `process.env`706706Environment key-value pairs. Extends automatically from `process.env`. Set [`extendEnv`](#extendenv) to `false` if you don't want this.707Environment key-value pairs.708709Unless the [`extendEnv` option](#extendenv) is `false`, the child process also uses the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).710711#### argv0712713Type: `string`714
235 unmodified lines