Skip to content

Commit

Permalink
doc: update process.execArg example to be more useful
Browse files Browse the repository at this point in the history
PR-URL: #52412
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
  • Loading branch information
JakobJingleheimer authored and marco-ippolito committed May 3, 2024
1 parent b2a3dce commit b9bdb94
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1711,15 +1711,13 @@ the script name. These options are useful in order to spawn child processes with
the same execution environment as the parent.
```bash
node --harmony script.js --version
node --icu-data-dir=./foo --require ./bar.js script.js --version
```
Results in `process.execArgv`:
<!-- eslint-disable semi -->
```js
['--harmony']
```json
["--icu-data-dir=./foo", "--require", "./bar.js"]
```
And `process.argv`:
Expand Down

0 comments on commit b9bdb94

Please sign in to comment.