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 Apr 9, 2024
1 parent 5bae73d commit c82f3c9
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 c82f3c9

Please sign in to comment.