Skip to content

Commit

Permalink
Update input.md (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhigson committed Aug 14, 2024
1 parent 074ea4a commit d99a52a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ If the subprocess spawns its own subprocesses, they inherit environment variable

```js
// Keep the current process' environment variables, and set `NO_COLOR`
await execa({env: {NO_COLOR: 'true'})`node child.js`;
await execa({env: {NO_COLOR: 'true'}})`node child.js`;
// Discard the current process' environment variables, only pass `NO_COLOR`
await execa({env: {NO_COLOR: 'true'}, extendEnv: false)`node child.js`;
await execa({env: {NO_COLOR: 'true'}, extendEnv: false})`node child.js`;
```

If the subprocess is a Node.js file, environment variables are available using [`process.env`](https://nodejs.org/api/process.html#processenv).
Expand Down

0 comments on commit d99a52a

Please sign in to comment.