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:
parent
5bae73df90
commit
c82f3c9e80
@ -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`:
|
||||
|
Loading…
x
Reference in New Issue
Block a user