doc: update process.execArg example to be more useful

PR-URL: https://github.com/nodejs/node/pull/52412
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
This commit is contained in:
Jacob Smith 2024-04-09 22:42:05 +02:00 committed by GitHub
parent 5bae73df90
commit c82f3c9e80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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. the same execution environment as the parent.
```bash ```bash
node --harmony script.js --version node --icu-data-dir=./foo --require ./bar.js script.js --version
``` ```
Results in `process.execArgv`: Results in `process.execArgv`:
<!-- eslint-disable semi --> ```json
["--icu-data-dir=./foo", "--require", "./bar.js"]
```js
['--harmony']
``` ```
And `process.argv`: And `process.argv`: